Improved version generation