Update AudioView.js

Clean up code and bug fix