Re-organized some internal classes and whatnot.