this is an attempt to refactor recorder.js and recordermp3.js