Added constructor and a hasLoader() method.