Added versioning support, bug fixes