One more core refactoring