Minor code cleanups based on IntelliJ's code analysis