Move things around to better work as a module