initialize controller, structure pages somewhat