Yeah, you will probably notice that I touched a lot of stuff that needs cleanup, but in the interest of keeping this PR as clear as possible, I left things as they were when it wasn't dire.