Refactored literaltype to literal,  formatted code, added evaluation priorities in the js generation