Refactor to new docity system