Put some source files under JSHint control and corresponding fixes