Updated and cleaned up RTEngine sources (not done)
Fixed a lot of compile errors
Fixed cmake errors