Basic code auto diagnostic tools, small usability changes for console, support echo function in console.
Adding common lib.