System boot refactor