Added Lua scripting and collisions detection.