Adding documentation and updating tests to new flow