Massive cleanup, IntelliJ changes paths, so this commit is a total mess.

But it works.