Use new optimized datastructure instead of balanced tree
Inits stdin buffer to 0 to prevent strange bugs
Add profiling script
Some random stack/queue datastructure opt...