Changed imagerecorder into a separate function to avoid collisions in global name space.
Renamed picturerecording.js to imagerecorder.js to stay consistent with directory name