Refactor for 1.1 upgrade