Fixed most lint warnings, and one small syntax error.