tests: Documentation and minor bugs