Refactor loading.