Refactored to use Loader