Refactor block loading