added class factory to xPanel library