Added colour coding functions and css