New ResourceLoader class and implementation of it in existing usages