Wanli Emperor, Gao was ejected from office by Zhang and his ally, the eunuch Feng Bao, on charges that he had questioned the ability of the child emperor to rule. This left Zhang as the sole Grand Secretary, in effect controlling the entire Ming bureaucracy during the first ten years of the Wanli era. As Senior Grand Secretary Zhang's reforms consisted primarily of fiscal measures in order to address the persistent revenue shortages that plagued the government. At the same time, laws were instituted from 1573 onwards to tighten monitoring and assessment of officials, in an attempt to restore discipline to an increasingly corrupt bureaucracy. Other major measures included the large–scale retrenchment of officials to achieve savings, as well as efforts to reclaim tax–exempt lands and expand the revenue base. In 1580 the single whip law was instituted, commuting all taxes and labour obligations into silver payments, while an empire–wide land survey was also ordered. In military affairs, Zhang promoted and supported competent generals such as Qi Jiguang in order to strengthen the empire's northern borders. Zhang also played a very important role as mentor and regent during the early years of the reign of the Wanli Emperor. He strongly influenced and guided the emperor through his teenage years. However, the strict upbringing he imposed on the emperor also aroused resentment, while his attempts to centralise government and improve its finances affected the interests of large sections of the bureaucracy, leading to frequent controversy. One example of this was the death of Zhang's father in 1577; normally this would have obliged Zhang to enter filial mourning (according to Confucianist tradition) and leave his post, but Zhang applied to remain in office, and was retained by the emperor. In the subsequent dispute over the propriety of Zhang's actions, several opposing officials were subjected to punishment by caning, which only increased the impression of Zhang's domineering nature. Zhang's fiscal policies met with only mixed success, due to the institutional resistance to his reforms. While the fiscal situation of the imperial government was much improved, and the coffers were refilled with silver, most of the reforms he instituted either failed to achieve their aims, such as the empire-wide land survey, or were quickly discarded after his death in 1582. At the same time, his luxurious lifestyle—which included meals with over a hundred dishes, and a palanquin carried by 32 men—exposed him to charges