Timer underway, need a javascript refactor