Refactoring: create boot.core package and move relevant code into it