update history text color
Re-added parentheses auto-balance (maybe), fixed last unit test.