First and raw api support + mposcompatibility fixes/codereadability improvements