Very a big refactoring
merge