Code cleanup.
Fixed #3. Fixed #6. Added colouring to the output.