Intermediate commit
Refactoring core