Added error highlighting and fixed tests