Initial (ported) commit. Does not work! Segmentation error!
Ignore file.