Change ordering of term insertion operation. Closes #7