Added support for console colors and fixed some bugs
Added some unit tests