refactoring: split things out into a bunch more packages+modules