Fixed some linting problems and minor errors.