trim variables
js fixes