Fix all static analyser warnings

Added necessary autoreleases, and fixed incorrect removing of objects from freeTransporters.
Fix all major memory leaks

Fixed major memory leak with rawMaterials not releasing, and some other memory bugs.