Cleanup
Refactor for the new propsed api