Fixed a problem with the buttons, added comments