Made minor improvements with IntelliJ