code cleanup + Cakefile