Added option for JS to be outputted
Fixed functions and imports for std