Initial controller code for organizations.

This is not finished, polished code. Just some exploration until unit
tests are working.