Added comments to timer.js, moved createTimer to update.js, some other minor refactorings