Refactor of garethr's module.

Documentation needs updated and tests need rewritten.