diff --git a/FIDENTIS-Analyst-parent.iml b/FIDENTIS-Analyst-parent.iml
deleted file mode 100644
index 4fd5057cb905c9883efd97f2b04542e4458d711b..0000000000000000000000000000000000000000
--- a/FIDENTIS-Analyst-parent.iml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-  </component>
-</module>
\ No newline at end of file
diff --git a/GUI/GUI.iml b/GUI/GUI.iml
deleted file mode 100644
index c8d17b0fcc3fd5901b27b5ab278bf6834713b660..0000000000000000000000000000000000000000
--- a/GUI/GUI.iml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.jogamp.jogl:jogl-all:2.0-rc11" level="project" />
-    <orderEntry type="module" module-name="MeshModel" />
-    <orderEntry type="library" name="Maven: java3d:j3d-core-utils:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: java3d:vecmath:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: java3d:j3d-core:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: com.github.mokiat:java-data-front:v2.0.0" level="project" />
-    <orderEntry type="library" name="Maven: javax.vecmath:vecmath:1.5.2" level="project" />
-  </component>
-</module>
diff --git a/MeshModel/MeshModel.iml b/MeshModel/MeshModel.iml
deleted file mode 100644
index 80a28bc560f1f11818d2264d101264ece491fcca..0000000000000000000000000000000000000000
--- a/MeshModel/MeshModel.iml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
-      <sourceFolder url="file://$MODULE_DIR$/../application/src/test/java" isTestSource="true" />
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <content url="file://$MODULE_DIR$/../application/src/test/java" />
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:7.1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.72" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.google.inject:guice:no_aop:4.1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: javax.inject:javax.inject:1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: aopalliance:aopalliance:1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.google.guava:guava:19.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.21" level="project" />
-    <orderEntry type="library" name="Maven: java3d:j3d-core-utils:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: java3d:vecmath:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: java3d:j3d-core:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: com.github.mokiat:java-data-front:v2.0.0" level="project" />
-    <orderEntry type="library" name="Maven: javax.vecmath:vecmath:1.5.2" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.6.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.6.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.6.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.6.1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:7.1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.72" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.google.inject:guice:no_aop:4.1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: javax.inject:javax.inject:1" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: aopalliance:aopalliance:1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: com.google.guava:guava:19.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.21" level="project" />
-  </component>
-</module>
\ No newline at end of file
diff --git a/MeshModel/src/main/java/cz/fidentis/analyst/kdtree/KdNode.java b/MeshModel/src/main/java/cz/fidentis/analyst/kdtree/KdNode.java
new file mode 100644
index 0000000000000000000000000000000000000000..7156633509af9673c2361f202a89c187c898005e
--- /dev/null
+++ b/MeshModel/src/main/java/cz/fidentis/analyst/kdtree/KdNode.java
@@ -0,0 +1,193 @@
+package cz.fidentis.analyst.kdtree;
+
+import cz.fidentis.analyst.mesh.core.MeshFacet;
+import java.util.Collection;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.vecmath.Vector3d;
+
+/**
+ * A single node of a KD-tree. Sharing verticess across meshes is supported
+ * (the node links all faces that share the same vertex).
+ *
+ * @author Maria Kocurekova
+ */
+public class KdNode {
+    /**
+     * Current depth in the kd-tree
+     */
+    private final int depth;
+    
+    /**
+     * Mesh facets sharing the stored vertex
+     */
+    private Map<MeshFacet, Integer> facets = new HashMap<>();
+
+    /**
+     * KD-tree topology
+     */
+    private KdNode lesser = null;
+    private KdNode greater = null;
+    private KdNode parent;
+
+    /**
+     * Constructor of KdNode
+     *
+     * @param facet Mesh facet containing the mesh vertex. Must not be null
+     * @param index The index under which the vertex is stored in the mesh facet.
+     *              Must be &gt;= 0
+     * @param depth Depth of the node in the kd-tree. Must be &gt;= 0
+     * @param parent Parent node. Can be null
+     * @throws IllegalArgumentException if some parameter is wrong
+     */
+    public KdNode(MeshFacet facet, int index, int depth, KdNode parent) {
+        if (facet == null) {
+            throw new IllegalArgumentException("facet");
+        }
+        if (index < 0) {
+            throw new IllegalArgumentException("index");
+        }
+        if (depth < 0) {
+            throw new IllegalArgumentException("depth");
+        }
+        this.facets.putIfAbsent(facet, index);
+        this.depth = depth;
+        this.parent = parent;
+    }
+    
+    /**
+     * Constructor of KdNode
+     * 
+     * @param facets Mesh facets containing the mesh vertex. Must not be null or empty
+     * @param indices Indices under which the vertex is stored in the mesh facet.
+     *              Must be &gt;= 0 and their unmber has to correspond to the number of facets.
+     * @param depth Depth of the node in the kd-tree. Must be &gt;= 0
+     * @param parent Parent node. Can be null
+     * @throws IllegalArgumentException if some parameter is wrong
+     */
+    public KdNode(List<MeshFacet> facets, List<Integer> indices, int depth, KdNode parent) {
+        if (facets == null || facets.isEmpty()) {
+            throw new IllegalArgumentException("facets");
+        }
+        if (indices == null || indices.isEmpty()) {
+            throw new IllegalArgumentException("indices");
+        }
+        if (depth < 0) {
+            throw new IllegalArgumentException("depth");
+        }
+        if (facets.size() != indices.size()) {
+            throw new IllegalArgumentException("The number of facets and indiecs mismatch");
+        }
+        for (int i = 0; i < facets.size(); i++) {
+            this.facets.putIfAbsent(facets.get(i), indices.get(i));
+        }
+        this.depth = depth;
+        this.parent = parent;
+    }
+
+    /**
+     * Adds another mesh facet to the node. This facet has to share a vertex 
+     * (location coordinates) with vertex/facets already stored in the node. 
+     * Otherwise, the behaviour may be unexpected.
+     *
+     * @param facet Mesh facet which has a vertex with the same coordinates as already stored vertex
+     * @param index The index under which the vertex is stored in the mesh facet
+     */
+    public void addFacet(MeshFacet facet, int index){
+        this.facets.putIfAbsent(facet, index);
+    }
+
+    public int getDepth() {
+        return depth;
+    }
+
+    public Vector3d get3dLocation() {
+        Map.Entry<MeshFacet, Integer> entry = facets.entrySet().iterator().next();
+        return entry.getKey().getVertex(entry.getValue()).getPosition();
+    }
+
+    /**
+     * Tree traversal - go to the "lesser" child.
+     * 
+     * @return lesser node, null if current node is leaf
+     */
+    public KdNode getLesser() {
+        return lesser;
+    }
+
+    /**
+     * Tree traversal - go to the "grater" child.
+     * 
+     * @return greater node, null if current node is leaf
+     */
+    public KdNode getGreater() {
+        return greater;
+    }
+
+    /**
+     * Tree traversal - go to the parent node.
+     * 
+     * @return parent of this node, null if current node is root
+     */
+    public KdNode getParent() {
+        return parent;
+    }
+
+    /**
+     * Set lesser node.
+     *
+     * @param lesser Node to be set as lesser
+     * @return current node
+     */
+    public KdNode setLesser(KdNode lesser) {
+        this.lesser = lesser;
+        return this;
+    }
+
+    /**
+     * Set lesser node.
+     *
+     * @param greater Node to be set as greater
+     * @return current node
+     */
+    public KdNode setGreater(KdNode greater) {
+        this.greater = greater;
+        return this;
+    }
+
+    /**
+     * Returns a map of all mesh facets that share the stored vertex. 
+     * Value in the map contains the index which the vertex is stored in the mesh facet.
+     * 
+     * @return Map of facets sharing the stored mesh vertex
+     */
+    public Map<MeshFacet, Integer> getFacets() {
+        return Collections.unmodifiableMap(facets);
+    }
+
+    /**
+     * Set parent node.
+     *
+     * @param parent Node to be set as parent
+     * @return current node
+     */
+    public KdNode setParent(KdNode parent) {
+        this.parent = parent;
+        return this;
+    }
+    
+    @Override
+    public String toString() {
+        String ret = "";
+        for (int i = 0; i < depth; i++) {
+            ret += " ";
+        }
+        ret += "Node position: " + get3dLocation() + ", num. facets:  " + facets.size();
+        ret += System.lineSeparator();
+        return ret;
+    }
+
+}
diff --git a/MeshModel/src/main/java/cz/fidentis/analyst/kdtree/KdTreeImpl.java b/MeshModel/src/main/java/cz/fidentis/analyst/kdtree/KdTreeImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..dbffe004120e42d8d0d62dbf8a8efabd9e2b7e45
--- /dev/null
+++ b/MeshModel/src/main/java/cz/fidentis/analyst/kdtree/KdTreeImpl.java
@@ -0,0 +1,406 @@
+package cz.fidentis.analyst.kdtree;
+
+import cz.fidentis.analyst.mesh.core.MeshFacet;
+import cz.fidentis.analyst.mesh.core.MeshFacetImpl;
+import cz.fidentis.analyst.mesh.core.MeshPoint;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.TreeMap;
+import javax.vecmath.Vector3d;
+
+
+/**
+ * KD-tree for storing vertices (MeshPoints) of triangular meshes (MeshFacets).
+ * Multiple mesh facets can by stored in a single kd-tree. In this case, 
+ * vertices that are shared across multiple facets (have the same 3D location) 
+ * are shared in the same node of the kd-tree.
+ *
+ * @author Maria Kocurekova
+ */
+public class KdTreeImpl {
+    private KdNode root;
+    
+    /**
+     * Constructor.
+     *
+     * @param points A set of individual mesh points. 
+     * If no mesh points are provided, then an empty 
+     * KD-tree is constructed (with the root node set to null).
+     */
+    public KdTreeImpl(Set<MeshPoint> points) {
+        if(points == null) {
+            this.root = null;
+            return;
+        }
+        MeshFacet newFacet = new MeshFacetImpl();
+        for(MeshPoint point : points) {
+            newFacet.addVertex(point);
+        }
+        buildTree(new LinkedList<>(Collections.singleton(newFacet)));
+    }
+
+    /**
+     * Constructor. If no mesh points (vertices) are provided, then an empty 
+     * KD-tree is constructed (with the root node set to null).
+     *
+     * @param facet Mesh facet
+     */
+    public KdTreeImpl(MeshFacet facet) {
+        this(new LinkedList<>(Collections.singleton(facet)));
+    }
+
+    /**
+     * Constructor. If no mesh points (vertices) are provided, then an empty 
+     * KD-tree is constructed (with the root node set to null).
+     * If multiple mesh factes share the same vertex, then they are stored 
+     * efficiently in the same node of the KD-tree.
+     *
+     * @param facets The list of mesh facets to be stored. Facets can share vertices.
+     */
+    public KdTreeImpl(List<MeshFacet> facets) {
+        if(facets == null ||  facets.isEmpty() || facets.get(0).getVertices().isEmpty() ){
+            this.root = null;
+            return;
+        }
+        buildTree(facets);        
+    }
+    
+    /**
+     * Finds the closest node for given mesh point.
+     *
+     * @param p Mesh point to be searched
+     * @return the closest node of the kd-tree or null
+     */
+    public KdNode closestNode(MeshPoint p) {
+        if (p == null) {
+            return null;
+        }
+        return closestNode(p.getPosition());
+    }
+
+    /**
+     * Finds the closest node for given 3D location.
+     *
+     * @param pointPos 3D location
+     * @return the closest node of the kd-tree or null
+     */
+    public KdNode closestNode(Vector3d pointPos) {
+        if (pointPos == null || this.root == null) {
+            return null;
+        }
+        
+        /*
+         * First, find the closest node
+         */
+        double minDistance = Double.MAX_VALUE;
+        KdNode nearNode = root;
+        KdNode searchedNode = root;
+
+        while (searchedNode != null) {
+            Vector3d nodePos = searchedNode.get3dLocation();
+            double dist = MeshPoint.distance(pointPos, nodePos);
+            if(dist < minDistance){
+                nearNode = searchedNode;
+                minDistance = dist;
+            }
+
+            if (firstIsLessThanSecond(pointPos, nodePos, searchedNode.getDepth())) {
+                searchedNode = searchedNode.getLesser();
+            }else{
+                searchedNode = searchedNode.getGreater();
+            }
+        }
+
+        /*
+         * Second, search for a vertex that could be potentially closer than
+         * the nearest vertex already found
+         */
+        double distOnAxis;
+        Queue<KdNode> queue = new LinkedList<>();
+        queue.add(root);
+
+        while (!queue.isEmpty()) {
+            
+            if (minDistance == 0) { // nothing can be closer
+                break;
+            }
+
+            searchedNode = queue.poll();
+            Vector3d nodePos = searchedNode.get3dLocation();
+
+            double dist = MeshPoint.distance(pointPos, nodePos);
+            if (dist < minDistance) {
+                nearNode = searchedNode;
+                minDistance = dist;
+            }
+
+            distOnAxis = minDistanceIntersection(nodePos, pointPos, searchedNode.getDepth());
+
+            if (distOnAxis > minDistance) {
+                if (firstIsLessThanSecond(pointPos, nodePos, searchedNode.getDepth())) {
+                    if (searchedNode.getLesser() != null) {
+                        queue.add(searchedNode.getLesser());
+                    }
+                } else {
+                    if (searchedNode.getGreater() != null) {
+                        queue.add(searchedNode.getGreater());
+                    }
+                }
+            } else {
+                if (searchedNode.getLesser() != null) {
+                    queue.add(searchedNode.getLesser());
+                }
+                if (searchedNode.getGreater() != null) {
+                    queue.add(searchedNode.getGreater());
+                }
+            }
+        }
+
+        return nearNode;
+    }
+
+    /**
+     * Checks if the kd-tree includes a node with 3D location corresponsding 
+     * to the given mesh point.
+     * 
+     * @param p Point whose location is searched
+     * @return true if there is node covering the same 3D location, false otherwise.
+     * @throws NullPointerException if the input parameter is null or has no position set
+     */
+    public boolean containsPoint(MeshPoint p){
+        KdNode node = closestNode(p);
+        if (node == null) {
+            return false;
+        }
+        return p.getPosition().equals(node.get3dLocation());
+    }
+
+    @Override
+    public String toString() {
+        String ret = "";
+        Queue<KdNode> queue = new LinkedList<>();
+        queue.add(root);
+
+        while (!queue.isEmpty()) {
+            KdNode node = queue.poll();
+            if (node == null) {
+                continue;
+            }
+            queue.add(node.getLesser());
+            queue.add(node.getGreater());
+            ret += node.toString();
+        }
+        
+        return ret;
+    }
+
+    
+    /***********************************************************
+     *  PRIVATE METHODS
+     ***********************************************************/  
+    
+    private void buildTree(List<MeshFacet> facets) {
+        SortedMap<Vector3d, AggregatedVertex> vertices = new TreeMap<>(new ComparatorX());
+        
+        /*
+         * Sort all vertices according to the X coordinate, aggregate vertices
+         * with the same 3D location.
+         */
+        for (MeshFacet facet: facets) {
+            int index = 0;
+            for (MeshPoint p: facet.getVertices()) {
+                Vector3d k = p.getPosition();
+                if (vertices.containsKey(k)) {
+                    vertices.get(k).facets.add(facet);
+                    vertices.get(k).indices.add(index);
+                } else {
+                    vertices.put(k, new AggregatedVertex(facet, index));
+                }
+                index++;
+            }
+        }
+        
+        root = buildTree(null, vertices, 0);
+    }
+    
+    /**
+     * Builds kd-tree.
+     *
+     * @param parent Parent node
+     * @param vertices List of aggregates sorted vertices
+     * @param level Tree depth that affects the splitting direction (x, y, or z)
+     * @return new node of the kd-tree or null
+     */
+    private KdNode buildTree(KdNode parent, SortedMap<Vector3d, AggregatedVertex> vertices, int level) {
+        
+        if (vertices.isEmpty()) {
+            return null;
+        }
+        
+        Vector3d pivot = findPivot(vertices);
+        AggregatedVertex data = vertices.get(pivot);
+        
+        KdNode node = new KdNode(data.facets, data.indices, level, parent);
+            
+        SortedMap<Vector3d, AggregatedVertex> left = null;
+        SortedMap<Vector3d, AggregatedVertex> right = null;
+            
+        switch (level % 3) {
+            case 0:
+                left = new TreeMap<>(new ComparatorX());
+                right = new TreeMap<>(new ComparatorX());
+                break;
+            case 1:
+                left = new TreeMap<>(new ComparatorY());
+                right = new TreeMap<>(new ComparatorY());
+                break;
+            case 2:
+                left = new TreeMap<>(new ComparatorZ());
+                right = new TreeMap<>(new ComparatorZ());
+                break;
+            default:
+                return null;
+        }
+
+        left.putAll(vertices.subMap(vertices.firstKey(), pivot));
+        vertices.keySet().removeAll(left.keySet());
+        vertices.remove(pivot);
+        right.putAll(vertices);
+
+        node.setLesser(buildTree(node, left, level + 1));
+        node.setGreater(buildTree(node, right, level + 1));
+        
+        return node;
+    }
+    
+    /**
+     * Finds and return the middle key
+     * @param map Map to be searched
+     * @return middle key
+     */
+    private Vector3d findPivot(SortedMap<Vector3d, AggregatedVertex> map) {
+        int mid = (map.size() / 2);
+        int i = 0;
+        for (Vector3d key: map.keySet()) {
+            if (i++ == mid) {
+                return key;
+            }
+        }
+        return null;
+    }
+    
+    private boolean firstIsLessThanSecond(Vector3d v1, Vector3d v2, int level){
+        switch (level % 3) {
+            case 0:
+                return v1.x <= v2.x;
+            case 1:
+                return v1.y <= v2.y;
+            case 2:
+                return v1.z <= v2.z;
+            default:
+                break;
+        }
+        return false;
+    }
+    
+    /**
+     * Calculates distance between two points
+     * (currently searched node and point to which we want to find nearest neighbor)
+     * (based on axis)
+     *
+     */
+    private double minDistanceIntersection(Vector3d nodePosition, Vector3d pointPosition, int level){
+        switch (level % 3) {
+            case 0:
+                return Math.abs(nodePosition.x - pointPosition.x);
+            case 1:
+                return Math.abs(nodePosition.y - pointPosition.y);
+            default:
+                return Math.abs(nodePosition.z - pointPosition.z);
+        }
+    }
+   
+    
+    /***********************************************************
+    *  EMBEDDED CLASSES
+    ************************************************************/   
+
+    /**
+     * Helper class used during the kd-tree creation to store mesh vertices
+     * with the same 3D location.
+     * 
+     * @author Radek Oslejsek
+     */
+    private class AggregatedVertex {
+        public final List<MeshFacet> facets = new ArrayList<>();
+        public final List<Integer> indices = new ArrayList<>();
+        
+        AggregatedVertex(MeshFacet f, int i) {
+            facets.add(f);
+            indices.add(i);
+        }
+    }
+    
+    /**
+     * Comparator prioritizing the X coordinate.
+     * @author Radek Oslejsek
+     */
+    private class ComparatorX implements Comparator<Vector3d> {
+        @Override
+        public int compare(Vector3d arg0, Vector3d arg1) {
+            int diff = Double.compare(arg0.x, arg1.x);
+            if (diff != 0) { 
+                return diff; 
+            }
+            diff = Double.compare(arg0.y, arg1.y);
+            if (diff != 0) { 
+                return diff; 
+            }
+            return Double.compare(arg0.z, arg1.z);
+        }    
+    }
+    
+    /**
+     * Comparator prioritizing the X coordinate.
+     * @author Radek Oslejsek
+     */
+    private class ComparatorY implements Comparator<Vector3d> {
+        @Override
+        public int compare(Vector3d arg0, Vector3d arg1) {
+            int diff = Double.compare(arg0.y, arg1.y);
+            if (diff != 0) { 
+                return diff; 
+            }
+            diff = Double.compare(arg0.x, arg1.x);
+            if (diff != 0) { 
+                return diff; 
+            }
+            return Double.compare(arg0.z, arg1.z);
+        }    
+    }
+    
+    /**
+     * Comparator prioritizing the X coordinate.
+     * @author Radek Oslejsek
+     */
+    private class ComparatorZ implements Comparator<Vector3d> {
+        @Override
+        public int compare(Vector3d arg0, Vector3d arg1) {
+            int diff = Double.compare(arg0.z, arg1.z);
+            if (diff != 0) { 
+                return diff; 
+            }
+            diff = Double.compare(arg0.y, arg1.y);
+            if (diff != 0) { 
+                return diff; 
+            }
+            return Double.compare(arg0.x, arg1.x);
+        }    
+    }
+}
diff --git a/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPoint.java b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPoint.java
index 8b5b6252de21eaf5ce27b630311959441b5a9e1d..d79b27844fddb094b13f731e2273a642de4a976a 100644
--- a/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPoint.java
+++ b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPoint.java
@@ -9,6 +9,20 @@ import javax.vecmath.Vector3d;
  */
 public interface MeshPoint {
     
+    /**
+     * Helper method that calculates distance of two 3D points.
+     * 
+     * @param v1 The first 3D point. Must not be null.
+     * @param v2 The second 3D point. Must not be null.
+     * @return distance
+     * @throws NullPointerException if some input parameter is missing.
+     */
+    static double distance(Vector3d v1, Vector3d v2) {
+        return Math.sqrt(Math.pow(v1.x - v2.x, 2)
+                + Math.pow(v1.y - v2.y, 2)
+                + Math.pow(v1.z - v2.z, 2));
+    }
+    
     /**
      * @return normal
      */
@@ -23,6 +37,14 @@ public interface MeshPoint {
      * @return texture coordinates
      */
     Vector3d getTexCoord();
+    
+    /**
+     * Calculates distance between two mesh points.
+     *
+     * @param point The second mesh point
+     * @return the distance between this and another point
+     */
+    double distanceTo(MeshPoint point);
 
     /**
      * returns new instance of MeshPoint with subtracted position
diff --git a/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPointImpl.java b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPointImpl.java
index 9d845de12bec745690266d34ee8e7b67e9f37da1..8ab6694d69dae8d1e73f6b786136148ae14353bf 100644
--- a/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPointImpl.java
+++ b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/core/MeshPointImpl.java
@@ -58,6 +58,11 @@ public class MeshPointImpl implements MeshPoint {
     public Vector3d getTexCoord() {
         return texCoord;
     }
+    
+    @Override
+    public double distanceTo(MeshPoint point) {
+        return MeshPoint.distance(position, point.getPosition());
+    }
 
     @Override
     public MeshPoint subtractPosition(MeshPoint subtrahend) {
diff --git a/MeshModel/src/main/java/cz/fidentis/analyst/mesh/visitors/KdTreeBuildVisitor.java b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/visitors/KdTreeBuildVisitor.java
new file mode 100644
index 0000000000000000000000000000000000000000..d703b91bfcc7f0f9ef45915fe9503fc36a03a76e
--- /dev/null
+++ b/MeshModel/src/main/java/cz/fidentis/analyst/mesh/visitors/KdTreeBuildVisitor.java
@@ -0,0 +1,34 @@
+package cz.fidentis.analyst.mesh.visitors;
+
+import cz.fidentis.analyst.kdtree.KdTreeImpl;
+
+import cz.fidentis.analyst.mesh.core.MeshFacet;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * KdTreeBuildVisitor build k-d tree.
+ *
+ * @author Maria Kocurekova
+ */
+
+public class KdTreeBuildVisitor implements Visitor {
+    private List<MeshFacet> facets = new LinkedList<>();
+
+    @Override
+    public void visitMeshFacet(MeshFacet facet) {
+        this.facets.add(facet);
+    }
+
+
+    /**
+     * Returns k-d tree.
+     *
+     * @return k-d tree
+     */
+    public KdTreeImpl getKdTree() {
+        return new KdTreeImpl(facets);
+    }
+    
+}
diff --git a/MeshModel/src/test/java/cz/fidentis/analyst/mesh/kdtree/KdTreeTest.java b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/kdtree/KdTreeTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..3ad833bc5af3aa23df9b0774eb7ecf018ea49509
--- /dev/null
+++ b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/kdtree/KdTreeTest.java
@@ -0,0 +1,342 @@
+package cz.fidentis.analyst.mesh.kdtree;
+import cz.fidentis.analyst.kdtree.KdNode;
+import cz.fidentis.analyst.kdtree.KdTreeImpl;
+import cz.fidentis.analyst.mesh.core.MeshFacet;
+import cz.fidentis.analyst.mesh.core.MeshFacetImpl;
+import cz.fidentis.analyst.mesh.core.MeshPoint;
+import cz.fidentis.analyst.mesh.core.MeshPointImpl;
+import org.junit.jupiter.api.Test;
+
+import javax.vecmath.Vector3d;
+import java.util.*;
+
+import static org.junit.jupiter.api.Assertions.*;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+
+/**
+ * @author Maria Kocurekova
+ */
+
+public class KdTreeTest {
+
+    private Vector3d position = new Vector3d(0.1f, 0.5f, 0.7f);
+    private Vector3d normalAndTextCoord = new Vector3d(0,0,0);
+
+
+    @Test
+    public void testPut(){
+        MeshPoint p = new MeshPointImpl(position,normalAndTextCoord,normalAndTextCoord);
+
+        List<MeshFacet> facets = new LinkedList<>();
+        MeshFacet facet = new MeshFacetImpl();
+        facet.addVertex(p);
+        facets.add(facet);
+        KdTreeImpl tree = new KdTreeImpl(facets);
+        
+        //System.out.println("AAA"+tree);
+
+        assertTrue(tree.containsPoint(p));
+    }
+
+    @Test
+    public void testPutNothing(){
+        MeshPoint p = new MeshPointImpl(position,normalAndTextCoord,normalAndTextCoord);
+
+        List<MeshFacet> facets2 = new LinkedList<>();
+        KdTreeImpl tree = new KdTreeImpl(facets2);
+
+        assertFalse(tree.containsPoint(p));
+    }
+
+    /**
+     * Returns the closest point
+     *
+     * @param points list of points
+     * @param p point to which the closest point is searched
+     * @return the closest point to p
+     */
+    private MeshPoint findClosestSequential(List<MeshPoint> points, MeshPoint p){
+        if(points.isEmpty()){
+            return null;
+        }
+
+        MeshPoint closest = points.get(0);
+        double dis = closest.distanceTo(p);
+
+        for(MeshPoint cl : points){
+            if(cl.distanceTo(p) < dis){
+                dis = cl.distanceTo(p);
+                closest = cl;
+            }
+        }
+
+        return closest;
+    }
+
+    @Test
+    public void testFindClosestAlreadyIn(){
+        List<MeshFacet> facets = new LinkedList<>();
+
+        MeshFacet facet = new MeshFacetImpl();
+
+
+        List<MeshPoint> points = new LinkedList<>();
+        Vector3d positionOfPoints;
+
+        for(int i = 0; i < 1000; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+        facets.add(facet);
+        KdTreeImpl tree = new KdTreeImpl(facets);
+
+        Random r = new Random();
+
+        MeshPoint p = points.get(r.nextInt(points.size()));
+        assertTrue(tree.containsPoint(p));
+    }
+
+    @Test
+    public void testFindClosestAlreadyInTwoFacets(){
+        List<MeshFacet> facets = new LinkedList<>();
+
+        MeshFacet facet1 = new MeshFacetImpl();
+        MeshFacet facet2 = new MeshFacetImpl();
+
+
+        List<MeshPoint> points = new LinkedList<>();
+        Vector3d positionOfPoints;
+
+        for(int i = 0; i < 5; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet1.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+        for(int i = 5; i < 10; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet2.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+        facets.add(facet1);
+        facets.add(facet2);
+        KdTreeImpl tree = new KdTreeImpl(facets);
+
+        Random r = new Random();
+
+        MeshPoint p = points.get(r.nextInt(points.size()));
+        assertTrue(tree.containsPoint(p));
+    }
+
+    @Test
+    public void testCountOfFacets(){
+        List<MeshFacet> facets = new LinkedList<>();
+
+        MeshFacet facet1 = new MeshFacetImpl();
+        MeshFacet facet2 = new MeshFacetImpl();
+
+
+        List<MeshPoint> points = new LinkedList<>();
+        Vector3d positionOfPoints;
+
+        for(int i = 0; i < 10; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet1.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+        for(int i = 0; i < 10; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet2.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+        facets.add(facet1);
+        facets.add(facet2);
+        KdTreeImpl tree = new KdTreeImpl(facets);
+
+        Random r = new Random();
+
+        MeshPoint p = points.get(r.nextInt(points.size()));
+        assertTrue(tree.containsPoint(p));
+        KdNode node = tree.closestNode(p);
+        assertNotNull(node);
+        assertEquals(2, node.getFacets().size());
+    }
+
+    @Test
+    public void testFindClosestNotInTreeTwoFacets(){
+        List<MeshFacet> facets = new LinkedList<>();
+
+        MeshFacet facet1 = new MeshFacetImpl();
+        MeshFacet facet2 = new MeshFacetImpl();
+
+
+        List<MeshPoint> points = new LinkedList<>();
+        Vector3d positionOfPoints;
+
+        for(int i = 0; i < 5; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet1.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+        for(int i =5; i < 10; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet2.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+
+
+        facets.add(facet1);
+        facets.add(facet2);
+        KdTreeImpl tree = new KdTreeImpl(facets);
+
+        MeshPoint p = new MeshPointImpl(new Vector3d(2.5f, 0.3f, 1.2f), normalAndTextCoord,normalAndTextCoord);
+        KdNode node = tree.closestNode(p);
+        assertNotNull(node);
+        
+        MeshPoint seq = findClosestSequential(points, p);
+        assertNotNull(seq);
+        
+        assertEquals(node.get3dLocation(), seq.getPosition());
+    }
+    @Test
+    public void testIndexFoundTwoFacetsNoDuplicates(){
+        List<MeshFacet> facets = new LinkedList<>();
+
+        MeshFacet facet1 = new MeshFacetImpl();
+        MeshFacet facet2 = new MeshFacetImpl();
+
+
+        List<MeshPoint> points = new LinkedList<>();
+        Vector3d positionOfPoints;
+
+        for(int i = 5; i < 20; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet1.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+        for(int i =0; i < 5; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet2.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+
+
+        facets.add(facet1);
+        facets.add(facet2);
+        KdTreeImpl tree = new KdTreeImpl(facets);
+
+        Random r = new Random();
+
+        MeshPoint p = points.get(r.nextInt(points.size()));
+        KdNode node = tree.closestNode(p);
+        assertNotNull(node);
+        assertEquals(node.get3dLocation(), p.getPosition());
+        
+        Map<MeshFacet, Integer> found = node.getFacets();
+        Map.Entry<MeshFacet, Integer> entry = found.entrySet().iterator().next();
+        assertEquals(entry.getKey().getVertex(entry.getValue()), p);        
+    }
+
+    @Test
+    public void testIndexFoundTwoFacetsAllDuplicates(){
+        List<MeshFacet> facets = new LinkedList<>();
+
+        MeshFacet facet1 = new MeshFacetImpl();
+        MeshFacet facet2 = new MeshFacetImpl();
+
+
+        List<MeshPoint> points = new LinkedList<>();
+        Vector3d positionOfPoints;
+
+        for(int i = 0; i < 10; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet1.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+        for(int i =0; i < 10; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet2.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+
+
+        facets.add(facet1);
+        facets.add(facet2);
+        KdTreeImpl tree = new KdTreeImpl(facets);
+
+        Random r = new Random();
+
+        MeshPoint p = points.get(r.nextInt(points.size()));
+        KdNode node = tree.closestNode(p);
+        assertNotNull(node);
+        assertEquals(node.get3dLocation(), p.getPosition());
+        
+        Map<MeshFacet, Integer> found = node.getFacets();
+        Map.Entry<MeshFacet, Integer> entry = found.entrySet().iterator().next();
+        assertEquals(entry.getKey().getVertex(entry.getValue()), p);        
+
+        MeshFacet second = (new ArrayList<>(found.keySet())).get(1);
+        int secondIndex = (new ArrayList<>(found.values())).get(1);
+        assertEquals(second.getVertex(secondIndex), p);
+        
+        assertEquals(0.0f, second.getVertex(secondIndex).distanceTo(entry.getKey().getVertex(entry.getValue())));
+    }
+
+
+    @Test
+    public void testOneFacetNearNeighbourIndex(){
+        MeshFacet facet1 = new MeshFacetImpl();
+
+
+        List<MeshPoint> points = new LinkedList<>();
+        Vector3d positionOfPoints;
+
+        for(int i = 1; i < 20; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            facet1.addVertex(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+
+        KdTreeImpl tree = new KdTreeImpl(facet1);
+
+        Random r = new Random();
+
+        MeshPoint p = points.get(r.nextInt(points.size()));
+        KdNode node = tree.closestNode(p);
+        assertNotNull(node);
+        assertEquals(node.get3dLocation(), p.getPosition());
+        
+        Map<MeshFacet, Integer> found = node.getFacets();
+        Map.Entry<MeshFacet, Integer> entry = found.entrySet().iterator().next();
+        assertEquals(entry.getKey().getVertex(entry.getValue()), p);
+    }
+
+    @Test
+    public void testSetOfPointsNearNeighbourIndex(){
+        Set<MeshPoint> points = new HashSet<>();
+        List<MeshPoint> pointsList = new LinkedList<>();
+        Vector3d positionOfPoints;
+
+        for(int i = 1; i < 20; i++){
+            positionOfPoints = new Vector3d(0.1f * i, 0.5f * i, 0.7f * i);
+            points.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+            pointsList.add(new MeshPointImpl(positionOfPoints, normalAndTextCoord, normalAndTextCoord));
+        }
+
+        KdTreeImpl tree = new KdTreeImpl(points);
+
+        Random r = new Random();
+        MeshPoint p = pointsList.get(r.nextInt(points.size()));
+        KdNode node = tree.closestNode(p);
+        assertNotNull(node);
+        assertEquals(node.get3dLocation(), p.getPosition());
+        
+        Map<MeshFacet, Integer> found = node.getFacets();
+        Map.Entry<MeshFacet, Integer> entry = found.entrySet().iterator().next();
+        assertEquals(entry.getKey().getVertex(entry.getValue()), p);
+    }
+
+}
+
+
diff --git a/MeshModel/src/test/java/cz/fidentis/analyst/mesh/visitors/KdTreeBuildVisitorTest.java b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/visitors/KdTreeBuildVisitorTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..1fead8af2d734a556b7de83354a421562cbdd022
--- /dev/null
+++ b/MeshModel/src/test/java/cz/fidentis/analyst/mesh/visitors/KdTreeBuildVisitorTest.java
@@ -0,0 +1,77 @@
+package cz.fidentis.analyst.mesh.visitors;
+
+import cz.fidentis.analyst.kdtree.KdNode;
+import cz.fidentis.analyst.mesh.core.*;
+import cz.fidentis.analyst.mesh.io.MeshObjLoader;
+import cz.fidentis.analyst.kdtree.KdTreeImpl;
+import org.junit.jupiter.api.Test;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.*;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class KdTreeBuildVisitorTest {
+
+    Path testFileDirectory = Paths.get("src", "test", "resources", "cz", "fidentis", "analyst", "mesh", "io");
+
+    @Test
+    void testCreateVisitorsAndGetKdTree() throws IOException {
+        MeshModel m = MeshObjLoader.read(new File(testFileDirectory.toFile(), "IcoSphere-20.obj"));
+        assertNotNull(m);
+        KdTreeBuildVisitor visitor = new KdTreeBuildVisitor();
+        m.accept(visitor);
+        assertEquals(1, m.getFacets().size());
+
+        List<MeshPoint> points = new LinkedList<>();
+
+        for(MeshFacet facet : m.getFacets()){
+            points.addAll(facet.getVertices());
+        }
+
+        Random r = new Random();
+
+        MeshPoint p = points.get(r.nextInt(points.size()));
+        KdTreeImpl tree= visitor.getKdTree();
+        
+        KdNode node = tree.closestNode(p);
+        assertNotNull(node);
+        assertEquals(node.get3dLocation(), p.getPosition());
+    }
+
+    @Test
+    void testCreateVisitorsAndGetKdTreeDuplicate() throws IOException {
+        MeshModel m = MeshObjLoader.read(new File(testFileDirectory.toFile(), "IcoSphere-20.obj"));
+        assertNotNull(m);
+        KdTreeBuildVisitor visitor = new KdTreeBuildVisitor();
+        m.accept(visitor);
+        assertEquals(1, m.getFacets().size());
+
+        List<MeshPoint> points = new LinkedList<>();
+        MeshFacet secondFacet = new MeshFacetImpl();
+        for(MeshFacet facet : m.getFacets()){
+            points.addAll(facet.getVertices());
+
+            for(MeshPoint point : facet.getVertices()) {
+                secondFacet.addVertex(point);
+            }
+        }
+
+
+        visitor.visitMeshFacet(secondFacet);
+        Random r = new Random();
+
+        MeshPoint p = points.get(r.nextInt(points.size()));
+        KdTreeImpl tree= visitor.getKdTree();
+
+        //System.out.println(tree);
+
+        KdNode node = tree.closestNode(p);
+        assertNotNull(node);
+        assertEquals(node.get3dLocation(), p.getPosition());
+        assertEquals(2, node.getFacets().size());
+    }
+
+}
\ No newline at end of file
diff --git a/Renderer/Renderer.iml b/Renderer/Renderer.iml
deleted file mode 100644
index 14061d54f54906514b5fade1f5cb826df069c1f1..0000000000000000000000000000000000000000
--- a/Renderer/Renderer.iml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" />
-  </component>
-</module>
\ No newline at end of file
diff --git a/application/FIDENTIS-Analyst-app.iml b/application/FIDENTIS-Analyst-app.iml
deleted file mode 100644
index f7dd0b482444d05c44bdb970a6886abacb5d6d5b..0000000000000000000000000000000000000000
--- a/application/FIDENTIS-Analyst-app.iml
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:asm-all-5.0.1:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-filesystems:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-modules:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-util:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-util-lookup:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-bootstrap:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-util-ui:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-libs-asm:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-core-startup-base:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.ow2.asm:asm-all:5.0.1" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-boot-fx:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-boot-script:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-boot:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-geo:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-json:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html-sound:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:net-java-html:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:swing-layout-1.0.4:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-libs-javafx:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-awt:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-dialogs:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-windows:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-intent:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-progress:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-progress-nb:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-queries:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-swing-outline:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-actions:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-explorer:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-filesystems-nb:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-io:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-loaders:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-nodes:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-text:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-core:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-core-startup:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-execution:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-core-windows:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-options-api:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-swing-tabcontrol:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-editor-mimelookup:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-libs-jna:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-libs-jna-platform:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-libs-osgi:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-keyring:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-filesystems-compat8:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-io:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-modules-options-keymap:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-swing-plaf:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-sampler:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-spi-quicksearch:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-settings:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:org-netbeans-html-ko4j:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:org-netbeans-html-xhr4j:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.felix:org.apache.felix.main:4.2.1" level="project" />
-    <orderEntry type="library" name="Maven: org.apache.felix:org.apache.felix.framework:4.2.1" level="project" />
-    <orderEntry type="library" name="Maven: net.java.dev.jna:jna-platform:4.2.2" level="project" />
-    <orderEntry type="library" name="Maven: net.java.dev.jna:jna:4.2.2" level="project" />
-    <orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
-    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:osgi.core-5.0.0:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:osgi.cmpn-4.2:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:testng-6.8.1-dist:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-autoupdate-services:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-sendopts:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:updater:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-core-ui:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-libs-felix:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-modules-autoupdate-cli:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-autoupdate-ui:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-modules-favorites:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-modules-masterfs:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-modules-print:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: javax.help:javahelp:2.0.05" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.modules:org-netbeans-modules-keyring-fallback:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-core-netigso:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.external:org.eclipse.osgi_3.9.1.v20140110-1610:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-htmlui:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-templates:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-lib-uihandler:RELEASE82" level="project" />
-    <orderEntry type="module" module-name="FIDENTIS-Analyst-branding" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.netbeans.api:org-netbeans-modules-nbjunit:RELEASE82" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.netbeans.modules:org-netbeans-insane:RELEASE82" level="project" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-libs-junit4:RELEASE82" level="project" />
-    <orderEntry type="module" module-name="MeshModel" />
-    <orderEntry type="library" name="Maven: java3d:j3d-core-utils:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: java3d:vecmath:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: java3d:j3d-core:1.3.1" level="project" />
-    <orderEntry type="library" name="Maven: com.github.mokiat:java-data-front:v2.0.0" level="project" />
-    <orderEntry type="library" name="Maven: javax.vecmath:vecmath:1.5.2" level="project" />
-    <orderEntry type="module" module-name="Renderer" />
-    <orderEntry type="module" module-name="GUI" />
-    <orderEntry type="library" name="Maven: org.jogamp.jogl:jogl-all:2.0-rc11" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.6.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
-    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.6.0" level="project" />
-  </component>
-</module>
diff --git a/branding/FIDENTIS-Analyst-branding.iml b/branding/FIDENTIS-Analyst-branding.iml
deleted file mode 100644
index 14061d54f54906514b5fade1f5cb826df069c1f1..0000000000000000000000000000000000000000
--- a/branding/FIDENTIS-Analyst-branding.iml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
-    <output url="file://$MODULE_DIR$/target/classes" />
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
-    <content url="file://$MODULE_DIR$">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
-      <excludeFolder url="file://$MODULE_DIR$/target" />
-    </content>
-    <orderEntry type="inheritedJdk" />
-    <orderEntry type="sourceFolder" forTests="false" />
-    <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-api-annotations-common:RELEASE82" level="project" />
-  </component>
-</module>
\ No newline at end of file
diff --git a/codestyle.xml b/codestyle.xml
index a475147840130126567f66fae82e4d64e2557dad..4623da3b0a387cfef48c74f26b9db01597f343e6 100644
--- a/codestyle.xml
+++ b/codestyle.xml
@@ -63,7 +63,7 @@
             <property name="max" value="220"/>
         </module>-->
         <module name="MethodLength">
-            <property name="max" value="50"/>
+            <property name="max" value="70"/>
             <property name="countEmpty" value="false"/>
         </module>
         <module name="ParameterNumber"/>