Given the size of this file, it would benefit from being split up into submodules.