Add production timer.
Fix some coding mistakes.