Decompose into private modules

cc @brettstimmerman