add endpoint wrapper decorator.
get rid of declared state; make declare() and delete() optional