Fixes test code and documentation