Optimize class of semver converter