Use JSHint. Clean whitespace, variable names, etc.