Back button fixes and some cleanup