Update documentation and move tests