since all power rested in zakath 's hands , the bureaucrats and palace functionaries contested with each other for the emperor 's favor and strove with oftentimes wildly complicated plots to discredit their enemies .