fixed some bugs, buffer overruns, cmd structures now in static array, added make to clean