Plain C/CPU working (still needs cleanup).