Fix CollectFreeColors
Add simple tests for CollectFreeColors