pleased jshint; code cleanup :D