JS fixes for code climate