Fix some warnings

- Fix warnings due to Lua wrapper generator
- Fix missing return values in some methods
- Remove unreferenced variables
- Fix call to trackPhysicsChild