format command: improved; resize handler added;

some todo added;