Initial version of primitive extractor