rewrote makefile and restructured source
correctly implement play/pause and add error checks