Fixed several lint warnings and errors