code cleanup, api revisions, allowing multiple clients