Fixed and updated.

Need to declare the buffer global because of performance reasons.
+ ConsoleColor default would be nice.
And I don't know whether the console things work in shared objects like
they should. Need to google a bit around.
Updated