Refactored and removed unnecessary variables in ObjectLoader