Finished generalised successor function, colour update.