Added button functionality. Fixed input bugs.