Moved some code around for easier navigation when more entities come.
Did some IntelliJ code analyzer.
Did some IntelliJ code formatter.