Adding support of order of points (don't finished); refactoring; rusification.