Some refactoring and integration
Fully integrated and everything tested
Resolve merge conflics