removed unsigned short and long - used size_t instead, improved cmd system