removed unnecessary variables for buttons and added comments