refactored registerArtifact to be more node like