Changes to remove lag and make play/pause button work