start writing some tests, fix is_running bug
a few cleanups