fixed potential infinite recursion
removed unnecessary imports and unused method
removed unused field and method
removed unnecessary import
fixed potential NPEs
fixed potential NPEs