Refactor

Should be backwards-compatible, aside from a version bump. Just way better management of all this.