Added docs and some test refactors