Some modifications and preparing to change collision udpate code
Added lua scripting support and fixed grid collision system