moved useful code from ImageRecorderModule to ImageRecorder class. (module should just be the user interface)