fixed html5 audio
refactoring and code cleanup