cleanup, added edit button for territories