Add declarations of symbols as different colour selection

Also remove dead code and tidy up.
Corrected highlight segments