Fix stupid buffer overflow on memcpy
Move optimized 8-colors version to dedicated dir