got luabind working and move some code over to lua