small improvements after usage of http://www.jslint.com/