Improved tooltip and automatic colouring functions