Refactoring to make Artifact as first-class citizen