At the same time as he sought to fend off the Western powers from without, Chulalongkorn undertook major reforms within the country. These were often difficult to achieve, since they undercut the power bases of influential men at court. The young king proceeded gradually, assisted by several of his brothers and half-brothers; many of these—in particular the brilliant and energetic Prince Damrong Rajanubhab—were men of outstanding ability. The internal reforms carried through during Chulalongkorn's reign included the reorganization of the government into ministries with functional responsibilities and the creation of a centralized bureaucracy, the institution of a uniform and centralized system of administration over the outlying provinces, the systematization of government revenue collection, the abolition of slavery and labour-service requirements, the establishment of law courts and reformation of the judiciary,