added Exit action;
some fixes;