refactored audio context setup and added comments