Updated web audio api and formatted code