some Lua functions optimization; continued shape.tooutline