Removed uneeded booleans
added booleans to check which button has been pressed
Class file changed