managers and revamped tests

this (large) change represents an entirely new way to organize flowhub's internals.

I think it's a better way: more testable, better separation of concerns (not perfect, but hey! take what we can get, no?), and overall cleaner-looking code.

For what it's worth, this pull-request was created using the tip of this pull request branch.