Fixed memory leaks in bullet and compiler warnings in source code because ocd.
Fixed memory leaks and (most) compiler warnings