Several changes to use loader
Several changes to use loader