simplify public api; make formatter more customizable