Clean-up added territories and clean-up in code.