Made optimizations to sound player
Refactored sound player API
Added wait for music to fix #25