Use xtend instead of custom extend function
Remove global config; rename register to registerLoader

Merge instance config with defaults