Fc rework org api

Hey,

here's a small refactoring for the Org API.  It's mostly about refactoring some code to make it easier to debug over time.

I'll probably push another one in the next few days to do some similar things to other part of the API.

If you have questions or want to discuss some of the changes please let me know.

Thanks.