Used IntelliJ's code inspections to clean some things up