reorganized, commands working, except for heap space errors