Wip/rafactor for integration