Removed unused variables and added location id to user unit to setop undefined warning