Main bugs fixed. Need to implement VRML export.