jshinting cleaned up