Code cleanup plus getter

cleaned up some of the unnecessary code and added a getter method to get is the button is showing or not