Improved play/pause functionality