Added button event listeners to change attributes