ports functions refactored.
Streams renamed to ports. Tokenizer refactored. memp bug fixed.