headless js and time update

Simple update ready to be merged to master