Tidy up version handling.