editor size, state/buttons handling

changed editor sizing behavior, added some state handling to buttons