Rename script to FosRecorder and clean up the code