refactor to remove dependence on facecode.clj which was mostly early experiments
work on improving state management, purification