Added functionality to start/stop recording as well as making cleanup
clean.