wip
Added primitive multi-mode support, and fixed SOE.