For the next 273 years the palace grounds were left derelict until being rebuilt in 1867 under the leadership of Regent Heungseon Daewongun. The restoration was completed on a grand scale, with 330 buildings crowded together in a labyrinthine configuration. Within the palace walls were the Outer Court ("oejeon"), offices for the king and state officials, and the Inner Court ("naejeon"), which included living quarters for the royal family as well as gardens for leisure. Within its extensive precincts were other palaces, large and small, including "Junggung" (the Queen's residence) and "Donggung" (the Crown Prince's residence).