updated to lua 5.2
some clean up