Function buttons

Added a play/pause button, and cleaned up the code a bit.