A lot of work to make this library more of a module