optimise object loading and refactor