Comment my nice algo, reorganize file a bit
Implement cache mechanism to avoid re-writing already written pixels