Improvements to JS logic, added LESS support.