Refactored version grabber