Cleanup, ready for REST implementation