Added versioning to API functions

This is my first attempt at solving the API versioning issue.