Added coloured printing. Tidied up comments.