Finalized the module, much more flexible now.