Fixes most compilation errors. Adds Engine. Oh boy.