Refactored so version can be specified, defaults to latest