Cleaning up code based on suggestions from lint