fixed all bugs on Loader classes

split config and some other small change