A nicer way to handle the API versions

Instead of manually copy/pasting the API version functions every time we version bump, we should reuse the content of a previous API version.