Moved object loading logic to its own method