more general cleanup
start working on html/json export