Fixed some audio issues, refactoring