Implemented clearButtons function