Added colour conversions, fixed error handling, some utility functions