get-diff works in api
cleanup of comments
routing for getdiff works
cleanup comments
changes to global vars