autoformat
really minor jshint^in
fix possible $ is undefined error, which i encountered here...