small object mode refactor