- added logic to process elapsedTime and current machine time
- cleaned up js and html code