Add license and thirdparty code
Remove unused geom3d package, and fix some bugs from thirdparty packaging