Adds more functionality to the admin page. Removes repeated code to make it more DRY.