Last code before the long break (circa December 2011)
Cleanup and bug fixing done in November/December 2013 and April 2014