Finished adding some functionality to the navigation buttons.