Refactor for dojo 1.9 - not completed