History, color and syntax bugs fixed