[ai-0.36-58] project re-structure [r2 only]
[ai-0.36-59] usable part from trinity [r2 only]
[ai-0.36-60] linux build fix [r2 only]