Clean up of code. Make some global variables static.
Added alarm and title sounds.