wip - more api->data refactoring.

This is incomplete. profiles.clj not finished.