Refactored client, added function versioning