some minor cleansup, and more importantly take doneDay from javascript model