Refactored the internals to gather version and archname in a better way