2013-Dec-23: Homework from review, refactorings and cleanup (ongoing)