added variable to the class to control JS output

(plus trailing whitespace removal)