Added button functionality. Not finished yet.