wip

add promise library
more work
more changes
use promises in toView
simplify the use of promises where we don t need to