Refactor so goblin can be used as a dependency