Refactor houndci