fixing contract delete/dirty bug
contract and advertisement creation and editing complete - fixed close window bug and maximum stack call error