Tweaks and improvements

- Debug support for Lua
- Optimize neural network calculation
- Trace improvements
- Parameter improvements