changed stream implementation to use array instead of linked list, moved struct command_stream definition to command-internls.h