commit fa634b08f4cf73696a0933e6962ad8f9f3eab30c
Author: Pavel Fidranský <fidransky@outlook.com>
Date:   Mon Aug 20 18:01:49 2018 +0200

    moved backend code to directories following Maven convention

diff --git a/sources/src/cz/zcu/kiv/offscreen/api/BaseEdge.java b/sources/src/cz/zcu/kiv/offscreen/api/BaseEdge.java
deleted file mode 100644
index 5a62f65..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/BaseEdge.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package cz.zcu.kiv.offscreen.api;
-
-/**
- * Class represents edge. Class contains attributes which are common for input JSON format and for
- * output JSON format (JSON between frontend and backend)
- */
-public class BaseEdge {
-    /** identification number of edge */
-    private int id;
-    /** original ID of vertex from edge leads */
-    private int from;
-    /** original ID of vertex where edge leads */
-    private int to;
-    /** additional info */
-    private String text;
-
-    public BaseEdge(int id, int from, int to, String text) {
-        this.id = id;
-        this.from = from;
-        this.to = to;
-        this.text = text;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public int getFrom() {
-        return from;
-    }
-
-    public void setFrom(int from) {
-        this.from = from;
-    }
-
-    public int getTo() {
-        return to;
-    }
-
-    public void setTo(int to) {
-        this.to = to;
-    }
-
-    public String getText() {
-        return text;
-    }
-
-    public void setText(String text) {
-        this.text = text;
-    }
-
-    /**
-     * Generate hash code based on attributes {@code from} and {@code to}.
-     * @return generated hash code.
-     */
-    @Override
-    public int hashCode() {
-        return from * 100000 + to;
-    }
-
-    /**
-     * Two edges are equals where their {@code from} and {@code to} are equals.
-     *
-     * @param edge which will be compared with this instance
-     * @return tru if edges are equal, false otherwise
-     */
-    @Override
-    public boolean equals(Object edge) {
-        if (!(edge instanceof BaseEdge)) return false;
-
-        BaseEdge cmpEdge = (BaseEdge) edge;
-        return from == cmpEdge.from && to == cmpEdge.to;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/BaseVertex.java b/sources/src/cz/zcu/kiv/offscreen/api/BaseVertex.java
deleted file mode 100644
index 2fad2f0..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/BaseVertex.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package cz.zcu.kiv.offscreen.api;
-
-/**
- * Class represents vertex. Class contains attributes which are common for input JSON format and for
- * output JSON format (JSON between frontend and backend)
- */
-public class BaseVertex {
-
-    /** New generated identification number. */
-    private int id;
-    /** Identification number which is in input file. */
-    private int originalId;
-    /** Title of vertex. */
-    private String title;
-    /** Index of vertex archetype. */
-    private int archetypeIndex;
-    /** Additional info. */
-    private String text;
-
-    public BaseVertex(int id, int originalId, String title, int archetypeIndex, String text) {
-        this.id = id;
-        this.originalId = originalId;
-        this.title = title;
-        this.archetypeIndex = archetypeIndex;
-        this.text = text;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public int getOriginalId() {
-        return originalId;
-    }
-
-    public void setOriginalId(int originalId) {
-        this.originalId = originalId;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-    public void setTitle(String title) {
-        this.title = title;
-    }
-
-    public int getArchetype() {
-        return archetypeIndex;
-    }
-
-    public void setArchetype(int archetypeIndex) {
-        this.archetypeIndex = archetypeIndex;
-    }
-
-    public String getText() {
-        return text;
-    }
-
-    public void setText(String text) {
-        this.text = text;
-    }
-
-    /**
-     * Generate hash code which is based on {@code originalId}.
-     * @return generated has code
-     */
-    @Override
-    public int hashCode() {
-        return originalId;
-    }
-
-    /**
-     * Two vertices are equals when their {@code originalId} is equals.
-     * @param edge which will be compared with this instance
-     * @return true if vertices are equal, false otherwise
-     */
-    @Override
-    public boolean equals(Object edge) {
-        if (!(edge instanceof BaseVertex)) return false;
-        return originalId == ((BaseVertex) edge).originalId;
-    }
-}
\ No newline at end of file
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/Edge.java b/sources/src/cz/zcu/kiv/offscreen/api/Edge.java
deleted file mode 100644
index edbeceb..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/Edge.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package cz.zcu.kiv.offscreen.api;
-
-import java.util.List;
-
-/**
- * Class represents edge which is used for output JSON format (JSON between frontend and backend).
- */
-public class Edge extends BaseEdge {
-
-    /**
-     * List of subedgeInfo.
-     * When two input edges are equals, in output their are in one record and their differences are in subedgeInfo.
-     */
-    private List<SubedgeInfo> subedgeInfo;
-
-    /**
-     * Create new edge.
-     * @param id new generated identification number
-     * @param from original ID of vertex from edge leads
-     * @param to original ID of vertex where edge leads
-     * @param text additional info
-     * @param subedgeInfo list which contains differences between equals edges
-     */
-    public Edge(int id, int from, int to, String text, List<SubedgeInfo> subedgeInfo) {
-        super(id, from, to, text);
-        this.subedgeInfo = subedgeInfo;
-    }
-
-    public List<SubedgeInfo> getSubedgeInfo(){
-        return subedgeInfo;
-    }
-
-    public void setSubedgeInfo(List<SubedgeInfo> subedgeInfo) {
-        this.subedgeInfo = subedgeInfo;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/GraphExport.java b/sources/src/cz/zcu/kiv/offscreen/api/GraphExport.java
deleted file mode 100644
index 1c7218e..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/GraphExport.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package cz.zcu.kiv.offscreen.api;
-
-import cz.zcu.kiv.offscreen.graph.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-/**
- * Class represents graph with all information about graph plus information about state in which used store graph.
- * Class is used for creating of JSON which is send to frontend.
- */
-public class GraphExport {
-
-    private List<Vertex> vertices;
-    private List<Edge> edges;
-    private List<VertexArchetype> vertexArchetypes;
-    private List<EdgeArchetype> edgeArchetypes;
-    private List<AttributeType> attributeTypes;
-    private Map<String, List<String>> possibleEnumValues;
-    private Map<String, String> archetypeIcons;
-
-    private List<Group> groups;
-    private List<Position> positions;
-    private List<SideBar> sideBar;
-    private int selectedVertex;
-    private int selectedEdge;
-
-    private Logger logger = Logger.getLogger(GraphExport.class);
-
-    public GraphExport(Graph graph) {
-        logger.trace("ENTRY");
-        this.vertices = new ArrayList<>(graph.getVertices().values());
-        this.edges = new ArrayList<>(graph.getEdges());
-        this.vertexArchetypes = new ArrayList<>(graph.getVertexArchetypes());
-        this.edgeArchetypes = new ArrayList<>(graph.getEdgeArchetypes());
-        this.attributeTypes = new ArrayList<>(graph.getAttributeTypes());
-        this.possibleEnumValues = graph.getPossibleEnumValues();
-        this.archetypeIcons = graph.getArchetypeIcons();
-        this.groups = graph.getGraphState().getGroups();
-        this.positions = graph.getGraphState().getPositions();
-        this.sideBar = graph.getGraphState().getSideBar();
-        this.selectedVertex = graph.getGraphState().getSelectedVertex();
-        this.selectedEdge = graph.getGraphState().getSelectedEdge();
-        logger.trace("EXIT");
-    }
-
-    public List<Edge> getEdges() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return edges;
-    }
-
-    public List<Vertex> getVertices() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return vertices;
-    }
-
-    public List<VertexArchetype> getVertexArchetypes() {
-        return vertexArchetypes;
-    }
-
-    public List<EdgeArchetype> getEdgeArchetypes() {
-        return edgeArchetypes;
-    }
-
-    public List<AttributeType> getAttributeTypes() {
-        return attributeTypes;
-    }
-
-    public Map<String, List<String>> getPossibleEnumValues() {
-        return possibleEnumValues;
-    }
-
-    public Map<String, String> getArchetypeIcons() {
-        return archetypeIcons;
-    }
-
-    public List<Group> getGroups() {
-        return groups;
-    }
-
-    public List<Position> getPositions() {
-        return positions;
-    }
-
-    public List<SideBar> getSideBar() {
-        return sideBar;
-    }
-
-    public int getSelectedVertex() {
-        return selectedVertex;
-    }
-
-    public int getSelectedEdge() {
-        return selectedEdge;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/Group.java b/sources/src/cz/zcu/kiv/offscreen/api/Group.java
deleted file mode 100644
index 756c442..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/Group.java
+++ /dev/null
@@ -1,101 +0,0 @@
-package cz.zcu.kiv.offscreen.api;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Class represents group of edges and their settings. Used in JSON between frontend and backend.
- */
-public class Group {
-
-    /** Generated id of group which is unique only in groups. */
-    private int groupId;
-    /** Generated if of group which is unique in groups and vertexes. */
-    private int id;
-    /** Name of group */
-    private String name;
-    /** List of vertices id which belongs to this group */
-    private List<Integer> verticesId;
-    /** List of vertices id whose outgoing edges are visible. */
-    private List<Integer> verticesEdgeFromId;
-    /** List of vertices id whose incoming edges are visible. */
-    private List<Integer> verticesEdgeToId;
-
-    public Group(int groupId, int id, String name){
-        this.groupId = groupId;
-        this.id = id;
-        this.name = name;
-        verticesId = new ArrayList<>();
-        verticesEdgeFromId = new ArrayList<>();
-        verticesEdgeToId = new ArrayList<>();
-    }
-
-    public Group(int groupId, int id, String name, List<Integer> verticesId, List<Integer> verticesEdgeFromId, List<Integer> verticesEdgeToId) {
-        this.groupId = groupId;
-        this.id = id;
-        this.name = name;
-        this.verticesId = verticesId;
-        this.verticesEdgeFromId = verticesEdgeFromId;
-        this.verticesEdgeToId = verticesEdgeToId;
-    }
-
-    public int getGroupId() {
-        return groupId;
-    }
-
-    public void setGroupId(int groupId) {
-        this.groupId = groupId;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public void setId(int id) {
-        this.id = id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public List<Integer> getVerticesId() {
-        return verticesId;
-    }
-
-    public void setVerticesId(List<Integer> verticesId) {
-        this.verticesId = verticesId;
-    }
-
-    public List<Integer> getVerticesEdgeFromId() {
-        return verticesEdgeFromId;
-    }
-
-    public void setVerticesEdgeFromId(List<Integer> verticesEdgeFromId) {
-        this.verticesEdgeFromId = verticesEdgeFromId;
-    }
-
-    public List<Integer> getVerticesEdgeToId() {
-        return verticesEdgeToId;
-    }
-
-    public void setVerticesEdgeToId(List<Integer> verticesEdgeToId) {
-        this.verticesEdgeToId = verticesEdgeToId;
-    }
-
-    public void addVertexId(int vertexId){
-        this.verticesId.add(vertexId);
-    }
-
-    public void addVetexEdgeToId(int vertexId){
-        this.verticesEdgeToId.add(vertexId);
-    }
-
-    public void addVetexEdgeFromId(int vertexId){
-        this.verticesEdgeFromId.add(vertexId);
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/Position.java b/sources/src/cz/zcu/kiv/offscreen/api/Position.java
deleted file mode 100644
index 452c16d..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/Position.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package cz.zcu.kiv.offscreen.api;
-
-/**
- * Class is used for storing information about vertex/group relative position.
- */
-public class Position {
-
-    /** Identification number of vertex or group which was generated in application. */
-    private int vertexId;
-    /** Relative X position. */
-    private float x;
-    /** Relative Y position */
-    private float y;
-
-    public Position(int vertexId, float x, float y) {
-        this.vertexId = vertexId;
-        this.x = x;
-        this.y = y;
-    }
-
-    public int getVertexId() {
-        return vertexId;
-    }
-
-    public void setVertexId(int vertexId) {
-        this.vertexId = vertexId;
-    }
-
-    public float getX() {
-        return x;
-    }
-
-    public void setX(float x) {
-        this.x = x;
-    }
-
-    public float getY() {
-        return y;
-    }
-
-    public void setY(float y) {
-        this.y = y;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/SideBar.java b/sources/src/cz/zcu/kiv/offscreen/api/SideBar.java
deleted file mode 100644
index df26bd9..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/SideBar.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package cz.zcu.kiv.offscreen.api;
-
-/**
- * Class store information about item in side bar.
- */
-public class SideBar {
-
-    /** Identification number of vertex or group which was generated in application. */
-    private int vertexId;
-    /** Indicates if related vertexes of this item have visible icon which shows relation with this item. */
-    private boolean highlighted;
-
-    public SideBar(int vertexId, boolean highlighted) {
-        this.vertexId = vertexId;
-        this.highlighted = highlighted;
-    }
-
-    public int getVertexId() {
-        return vertexId;
-    }
-
-    public void setVertexId(int vertexId) {
-        this.vertexId = vertexId;
-    }
-
-    public boolean isHighlighted() {
-        return highlighted;
-    }
-
-    public void setHighlighted(boolean highlighted) {
-        this.highlighted = highlighted;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/SubedgeInfo.java b/sources/src/cz/zcu/kiv/offscreen/api/SubedgeInfo.java
deleted file mode 100644
index f1fb208..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/SubedgeInfo.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package cz.zcu.kiv.offscreen.api;
-
-import java.util.List;
-
-public class SubedgeInfo {
-
-    /** Edge archetype index. */
-    private int archetype;
-    /** Original id of edge which is taken from input JSON file. */
-    private int originalId;
-    /** List of all tributes. Every attribute is stored in String array in pair as {attribute name, attribute value}. */
-    private List<String[]> attributes;
-
-    /**
-     * Create new subedgeInfo
-     * @param originalId Original id of edge which is taken from input JSON file.
-     * @param archetype Edge archetype index.
-     * @param attributes  List of all tributes. Every attribute is stored in String array in pair as {attribute name, attribute value}.
-     */
-    public SubedgeInfo(int originalId, int archetype, List<String[]> attributes) {
-        this.originalId = originalId;
-        this.archetype = archetype;
-        this.attributes = attributes;
-    }
-
-    public int getOriginalId() {
-        return originalId;
-    }
-
-    public int getArchetype() {
-        return archetype;
-    }
-
-    public List<String[]> getAttributes() {
-        return attributes;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/api/Vertex.java b/sources/src/cz/zcu/kiv/offscreen/api/Vertex.java
deleted file mode 100644
index 7101628..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/api/Vertex.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package cz.zcu.kiv.offscreen.api;
-
-import java.util.List;
-
-/**
- * Class represents vertex which is used for output JSON format (JSON between frontend and backend)
- */
-public class Vertex extends BaseVertex {
-
-    /** List of all tributes. Every attribute is stored in String array in pair as {attribute name, attribute value}. */
-    private List<String[]> attributes;
-
-    /**
-     * Create new vertex.
-     * @param id new generated identification number.
-     * @param originalId original identification number from input file
-     * @param title title of vertex
-     * @param archetypeIndex index of vertex archetype
-     * @param text additional info
-     * @param attributes List of all attributes. Every attribute is stored in String array in pair as {attribute name, attribute value}.
-     */
-    public Vertex(int id, int originalId, String title, int archetypeIndex, String text, List<String[]> attributes) {
-        super(id, originalId, title, archetypeIndex, text);
-        this.attributes = attributes;
-    }
-
-    public List<String[]> getAttributes() {
-        return attributes;
-    }
-
-    public void setAttributes(List<String[]> attributes) {
-        this.attributes = attributes;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexData.java b/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexData.java
deleted file mode 100644
index ffe04e8..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexData.java
+++ /dev/null
@@ -1,46 +0,0 @@
-///**
-// *
-// */
-//package cz.zcu.kiv.offscreen.data.efpportal;
-//
-//import java.util.HashMap;
-//import java.util.Map;
-//
-///**
-// *
-// * Representation of EFPPortal's connections . A connection consists of a provided and required features.
-// *
-// * @author Jiri Loudil
-// *
-// */
-//public class CocaexData {
-//	/**
-//	 * Map of all provided features.
-//	 */
-//	private Map<String, CocaexDataFeature> providedFeatures;
-//
-//	/**
-//	 * Map of all required features.
-//	 */
-//	private Map<String, CocaexDataFeature> requiredFeatures;
-//
-//	public CocaexData() {
-//		this.providedFeatures = new HashMap<String, CocaexDataFeature>();
-//		this.requiredFeatures = new HashMap<String, CocaexDataFeature>();
-//	}
-//
-//	/**
-//	 * @return the providedFeatures
-//	 */
-//	public Map<String, CocaexDataFeature> getProvidedFeatures() {
-//		return providedFeatures;
-//	}
-//
-//	/**
-//	 * @return the importedFeatures
-//	 */
-//	public Map<String, CocaexDataFeature> getRequiredFeatures() {
-//		return requiredFeatures;
-//	}
-//
-//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataEfp.java b/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataEfp.java
deleted file mode 100644
index 80f677f..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataEfp.java
+++ /dev/null
@@ -1,69 +0,0 @@
-//package cz.zcu.kiv.offscreen.data.efpportal;
-//
-//import cz.zcu.kiv.efps.comparator.result.EfpEvalResult.MatchingResult;
-//import cz.zcu.kiv.efps.types.datatypes.EfpValueType;
-//
-///**
-// * Holds EFP's data.
-// *
-// * @author Jiri Loudil
-// *
-// */
-//public class CocaexDataEfp {
-//	private String efpName;
-//	private String efpValueTypeName;
-//	private EfpValueType efpValue;
-//	private MatchingResult typeError;
-//
-//	/**
-//	 * @return the efpName
-//	 */
-//	public String getEfpName() {
-//		return efpName;
-//	}
-//	/**
-//	 * @param efpName the efpName to set
-//	 */
-//	public void setEfpName(String efpName) {
-//		this.efpName = efpName;
-//	}
-//	/**
-//	 * @return the efpValueTypeName
-//	 */
-//	public String getEfpValueTypeName() {
-//		return efpValueTypeName;
-//	}
-//	/**
-//	 * @param efpValueTypeName the efpValueTypeName to set
-//	 */
-//	public void setEfpValueTypeName(String efpValueTypeName) {
-//		this.efpValueTypeName = efpValueTypeName;
-//	}
-//	/**
-//	 * @return the efpValue
-//	 */
-//	public EfpValueType getEfpValue() {
-//		return efpValue;
-//	}
-//	/**
-//	 * @param efpValue the efpValue to set
-//	 */
-//	public void setEfpValue(EfpValueType efpValue) {
-//		this.efpValue = efpValue;
-//	}
-//
-//	/**
-//	 * @return the typeError
-//	 */
-//	public MatchingResult getTypeError() {
-//		return typeError;
-//	}
-//
-//	/**
-//	 * @param typeError the typeError to set
-//	 */
-//	public void setTypeError(MatchingResult typeError) {
-//		this.typeError = typeError;
-//	}
-//
-//}
\ No newline at end of file
diff --git a/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataFeature.java b/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataFeature.java
deleted file mode 100644
index d3870c2..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataFeature.java
+++ /dev/null
@@ -1,33 +0,0 @@
-//package cz.zcu.kiv.offscreen.data.efpportal;
-//
-//import java.util.ArrayList;
-//import java.util.List;
-//
-///**
-// * Holds feature's data.
-// *
-// * @author Jiri Loudil
-// *
-// */
-//public class CocaexDataFeature {
-//	private List<CocaexDataEfp> efps;
-//
-//	public CocaexDataFeature() {
-//		this.efps = new ArrayList<CocaexDataEfp>();
-//	}
-//
-//	/**
-//	 * @return the efps
-//	 */
-//	public List<CocaexDataEfp> getEfps() {
-//		return efps;
-//	}
-//
-//	/**
-//	 * @param efps the efps to set
-//	 */
-//	public void setEfps(List<CocaexDataEfp> efps) {
-//		this.efps = efps;
-//	}
-//
-//}
\ No newline at end of file
diff --git a/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexWrapper.java b/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexWrapper.java
deleted file mode 100644
index 32fdd62..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/data/efpportal/CocaexWrapper.java
+++ /dev/null
@@ -1,66 +0,0 @@
-//package cz.zcu.kiv.offscreen.data.efpportal;
-//
-//import java.util.Map;
-//
-///**
-// *
-// * EFPPortal export data wrapper. Contains mappings for feature connection names and EFPs names.
-// *
-// * @author Jiri Loudil
-// *
-// */
-//public class CocaexWrapper {
-//	/**
-//	 * Feature names mapping.
-//	 */
-//	private Map<String, String> featureMappings;
-//
-//	/**
-//	 * EFPs name s mapping.
-//	 */
-//	private Map<String, String> efpMappings;
-//
-//	/**
-//	 * EFPPortal data with IDs instead of names for EFPs and Features.
-//	 */
-//	private Map<String, CocaexData> data;
-//
-//	/**
-//	 * @return the featureMappings
-//	 */
-//	public Map<String, String> getFeatureMappings() {
-//		return featureMappings;
-//	}
-//	/**
-//	 * @param featureMappings the featureMappings to set
-//	 */
-//	public void setFeatureMappings(Map<String, String> featureMappings) {
-//		this.featureMappings = featureMappings;
-//	}
-//	/**
-//	 * @return the efpMappings
-//	 */
-//	public Map<String, String> getEfpMappings() {
-//		return efpMappings;
-//	}
-//	/**
-//	 * @param efpMappings the efpMappings to set
-//	 */
-//	public void setEfpMappings(Map<String, String> efpMappings) {
-//		this.efpMappings = efpMappings;
-//	}
-//	/**
-//	 * @return the data
-//	 */
-//	public Map<String, CocaexData> getData() {
-//		return data;
-//	}
-//	/**
-//	 * @param data the data to set
-//	 */
-//	public void setData(Map<String, CocaexData> data) {
-//		this.data = data;
-//	}
-//
-//
-//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/efp/utils/JsonTransformer.java b/sources/src/cz/zcu/kiv/offscreen/efp/utils/JsonTransformer.java
deleted file mode 100644
index 1d33aac..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/efp/utils/JsonTransformer.java
+++ /dev/null
@@ -1,101 +0,0 @@
-//package cz.zcu.kiv.offscreen.efp.utils;
-//
-//import java.io.ByteArrayInputStream;
-//import java.io.IOException;
-//import java.util.zip.GZIPInputStream;
-//
-//import javax.servlet.http.HttpServletRequest;
-//
-//import org.apache.log4j.Logger;
-//
-//import net.sf.json.JSONObject;
-//
-//import org.apache.commons.codec.binary.Base64;
-//import org.apache.commons.io.IOUtils;
-//
-//import com.google.gson.Gson;
-//import com.google.gson.GsonBuilder;
-//
-//import cz.zcu.kiv.efps.types.datatypes.EfpValueType;
-//import cz.zcu.kiv.efps.types.serialisation.json.EfpValueTypeAdapter;
-//import cz.zcu.kiv.offscreen.api.GraphInterface;
-//import cz.zcu.kiv.offscreen.data.efpportal.CocaexWrapper;
-//import cz.zcu.kiv.offscreen.graph.GraphExport;
-//import cz.zcu.kiv.offscreen.graph.creator.EfpGraphTransfomer;
-//
-///**
-// *
-// * Transofma and decompress tools for incoming JSON.
-// *
-// * @author Jiri Loudil
-// *
-// */
-//public class JsonTransformer {
-//	private Logger logger = Logger.getLogger(JsonTransformer.class);
-//
-//	/**
-//	 *
-//	 * Deserialize input JSON and transform to graph JSON.
-//	 *
-//	 * @param inputJSON
-//	 * @param request
-//	 * @return
-//	 * @throws IOException
-//	 */
-//	public String transformInputJSONToGraphJSON(String inputJSON,
-//			HttpServletRequest request) throws IOException {
-//		CocaexWrapper efpResults;
-//
-//		GsonBuilder gsonBuilder = new GsonBuilder();
-//		// JSON deserializing adapter provided for EFP type classes
-//		gsonBuilder.registerTypeAdapter(EfpValueType.class,
-//				new EfpValueTypeAdapter());
-//		// JSON deserializing adapter for the Wrapper class
-//		gsonBuilder.registerTypeAdapter(CocaexWrapper.class,
-//				new WrapperDeserializer());
-//		Gson gson = gsonBuilder.create();
-//
-//		// decode + unzip received data
-//		String data = decompress(inputJSON);
-//
-//		// deserialize using deserializer adapters
-//		efpResults = gson.fromJson(data, CocaexWrapper.class);
-//
-//		request.setAttribute("efpPortalEfpNames", efpResults.getEfpMappings());
-//
-//		// transform received data to readable graph form
-//		EfpGraphTransfomer transformer = new EfpGraphTransfomer(efpResults);
-//		GraphInterface graph = transformer.transform();
-//		GraphExport export = new GraphExport(graph);
-//
-//		// transform graph to JSON
-//		JSONObject o = JSONObject.fromObject(export);
-//
-//		return o.toString();
-//	}
-//
-//	/**
-//	 * Decode and unzip a Base64 encoded GZIPed string.
-//	 *
-//	 * @param input
-//	 * @return
-//	 * @throws IOException
-//	 */
-//	private String decompress(String input) throws IOException {
-//		logger.trace("ENTRY");
-//		String result = null;
-//
-//		byte[] bytes = Base64.decodeBase64(input);
-//		GZIPInputStream zi = null;
-//		try {
-//			zi = new GZIPInputStream(new ByteArrayInputStream(bytes));
-//			result = IOUtils.toString(zi);
-//		} finally {
-//			IOUtils.closeQuietly(zi);
-//		}
-//		logger.trace("EXIT");
-//
-//		return result;
-//	}
-//
-//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/efp/utils/WrapperDeserializer.java b/sources/src/cz/zcu/kiv/offscreen/efp/utils/WrapperDeserializer.java
deleted file mode 100644
index fcff7f7..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/efp/utils/WrapperDeserializer.java
+++ /dev/null
@@ -1,76 +0,0 @@
-//package cz.zcu.kiv.offscreen.efp.utils;
-//
-//import java.lang.reflect.Type;
-//import java.util.HashMap;
-//import java.util.Map;
-//
-//import org.apache.log4j.Logger;
-//
-//import com.google.gson.Gson;
-//import com.google.gson.GsonBuilder;
-//import com.google.gson.JsonDeserializationContext;
-//import com.google.gson.JsonDeserializer;
-//import com.google.gson.JsonElement;
-//import com.google.gson.JsonObject;
-//
-//import cz.zcu.kiv.efps.types.datatypes.EfpValueType;
-//import cz.zcu.kiv.efps.types.serialisation.json.EfpValueTypeAdapter;
-//import cz.zcu.kiv.offscreen.data.efpportal.CocaexData;
-//import cz.zcu.kiv.offscreen.data.efpportal.CocaexWrapper;
-//
-///**
-// *
-// * CocaexWrapper class deserializer.
-// *
-// * @author Jiri Loudil
-// *
-// */
-//public class WrapperDeserializer implements JsonDeserializer<CocaexWrapper> {
-//	private Logger logger = Logger.getLogger(WrapperDeserializer.class);
-//
-//	@Override
-//	public CocaexWrapper deserialize(JsonElement json, Type typeOfT,
-//			JsonDeserializationContext context) {
-//		logger.trace("ENTRY");
-//
-//		GsonBuilder gsonBuilder = new GsonBuilder();
-//		// JSON deserializing adapter provided for EFP type classes
-//		gsonBuilder.registerTypeAdapter(EfpValueType.class,
-//				new EfpValueTypeAdapter());
-//		Gson gson = gsonBuilder.create();
-//
-//		CocaexWrapper wrapper = gson.fromJson(json, CocaexWrapper.class);
-//		JsonObject jo = json.getAsJsonObject();
-//
-//		Map<String, String> featureMappings = new HashMap<String, String>();
-//		Map<String, String> efpMappings = new HashMap<String, String>();
-//		Map<String, CocaexData> data = new HashMap<String, CocaexData>();
-//
-//		// parse feature mappings
-//		JsonObject featuresObject = jo.getAsJsonObject("featureMappings");
-//		for (Map.Entry<String, JsonElement> entry : featuresObject.entrySet()) {
-//			featureMappings.put(entry.getKey(), entry.getValue().getAsString());
-//		}
-//
-//		// parse efps mappings
-//		JsonObject efpsObject = jo.getAsJsonObject("efpMappings");
-//		for (Map.Entry<String, JsonElement> entry : efpsObject.entrySet()) {
-//			efpMappings.put(entry.getKey(), entry.getValue().getAsString());
-//		}
-//
-//		// parse data
-//		JsonObject dataObject = jo.getAsJsonObject("data");
-//		for (Map.Entry<String, JsonElement> entry : dataObject.entrySet()) {
-//			data.put(entry.getKey(), (CocaexData) context.deserialize(
-//					entry.getValue(), CocaexData.class));
-//		}
-//
-//		// fill output structure
-//		wrapper.setFeatureMappings(featureMappings);
-//		wrapper.setEfpMappings(efpMappings);
-//		wrapper.setData(data);
-//		logger.trace("EXIT");
-//
-//		return wrapper;
-//	}
-//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/Attribute.java b/sources/src/cz/zcu/kiv/offscreen/graph/Attribute.java
deleted file mode 100644
index 4a7daaa..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/Attribute.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-/**
- * This class represents attribute of edge or vertex.
- */
-public class Attribute {
-    /** Index to array of attribute types which is defined in input JSON file */
-    private int typeIndex;
-    /** Value of attribute */
-    private Object value;
-
-    public Attribute(int typeIndex, Object value) {
-        this.typeIndex = typeIndex;
-        this.value = value;
-    }
-
-    public int getTypeIndex() {
-        return typeIndex;
-    }
-
-    public void setTypeIndex(int typeIndex) {
-        this.typeIndex = typeIndex;
-    }
-
-    public Object getValue() {
-        return value;
-    }
-
-    public void setValue(Object value) {
-        this.value = value;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/AttributeType.java b/sources/src/cz/zcu/kiv/offscreen/graph/AttributeType.java
deleted file mode 100644
index 1240c67..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/AttributeType.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-/**
- * Class represents one attribute type which is used in input JSON file and in output JSON file (file between frontend
- * and backend).
- */
-public class AttributeType {
-    /** name of attribute */
-    public String name;
-    /** data type of attribute */
-    public GraphManager.AttributeDataType dataType;
-    /** additional info */
-    public String text;
-
-    public AttributeType(String name, GraphManager.AttributeDataType dataType, String text) {
-        this.name = name;
-        this.dataType = dataType;
-        this.text = text;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public GraphManager.AttributeDataType getDataType() {
-        return dataType;
-    }
-
-    public String getText() {
-        return text;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeArchetype.java b/sources/src/cz/zcu/kiv/offscreen/graph/EdgeArchetype.java
deleted file mode 100644
index 71b1995..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeArchetype.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-public class EdgeArchetype {
-    public String name;
-    public String text;
-
-    EdgeArchetype(String name, String text) {
-        this.name = name;
-        this.text = text;
-    }
-
-    public String getName() {
-        return  name;
-    }
-
-    public String getText() {
-        return text;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeArchetypeInfo.java b/sources/src/cz/zcu/kiv/offscreen/graph/EdgeArchetypeInfo.java
deleted file mode 100644
index d61acfc..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeArchetypeInfo.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-public class EdgeArchetypeInfo {
-    /**
-     * index of the archetype of the vertex the edge leads to
-     */
-    public int fromArchetypeIndex;
-
-    /**
-     * index of the archetype of the edge
-     */
-    public int edgeArchetypeIndex;
-
-    /**
-     * index of the archetype of the vertex the edge leads from
-     */
-    public int toArchetypeIndex;
-
-    public EdgeArchetypeInfo(int fromArchetypeIndex, int edgeArchetypeIndex, int toArchetypeIndex) {
-        this.fromArchetypeIndex = fromArchetypeIndex;
-        this.edgeArchetypeIndex = edgeArchetypeIndex;
-        this.toArchetypeIndex = toArchetypeIndex;
-    }
-
-    @Override
-    public int hashCode() {
-        return fromArchetypeIndex * 10000 + edgeArchetypeIndex * 100 + fromArchetypeIndex;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        EdgeArchetypeInfo info = (EdgeArchetypeInfo)obj;
-        return (info.fromArchetypeIndex == fromArchetypeIndex) && (info.edgeArchetypeIndex == edgeArchetypeIndex) && (info.toArchetypeIndex == toArchetypeIndex);
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeImpl.java b/sources/src/cz/zcu/kiv/offscreen/graph/EdgeImpl.java
deleted file mode 100644
index a696afe..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/EdgeImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import cz.zcu.kiv.offscreen.api.BaseEdge;
-
-import java.util.*;
-
-/**
- * Class represents edge which is used for input JSON format.
- */
-public class EdgeImpl extends BaseEdge {
-
-    /** original identification number which is defined in input file */
-    private int originalId;
-    /** index of edge archetype */
-    private int archetypeIndex;
-    /** Map contains attributes stored in key value format. Key is index to array of attribute types defined in input file */
-    private Map<Integer, Attribute> attributesMap;
-
-    /**
-     * Create new edge.
-     * @param id new generated identification number
-     * @param from original ID of vertex from edge leads
-     * @param to original ID of vertex where edge leads
-     * @param text additional info
-     * @param originalId original identification number which is defined in input file
-     * @param archetypeIndex index of edge archetype
-     */
-    public EdgeImpl(int id, int from, int to, String text, int originalId, int archetypeIndex) {
-        super(id, from, to, text);
-        this.originalId = originalId;
-        this.archetypeIndex = archetypeIndex;
-        this.attributesMap = new HashMap<>();
-    }
-
-    public Attribute getAttribute(int attrTypeIndex) {
-        return attributesMap.get(attrTypeIndex);
-    }
-
-    public Map<Integer, Attribute> getAttributesMap() {
-        return attributesMap;
-    }
-
-
-    public int getOriginalId() {
-        return originalId;
-    }
-
-
-    public int getArchetype() {
-        return archetypeIndex;
-    }
-
-
-    public void addAttribute(int attrTypeIndex, Object value) {
-        Attribute attr = new Attribute(attrTypeIndex, value);
-        attributesMap.put(attrTypeIndex, attr);
-    }
-
-    public void addAttributes(Map<Integer, Attribute> attributes) {
-        this.attributesMap.putAll(attributes);
-    }
-
-    public void setOriginalId(int originalId) {
-        this.originalId = originalId;
-    }
-
-    public void setArchetypeIndex(int archetypeIndex) {
-        this.archetypeIndex = archetypeIndex;
-    }
-
-    /**
-     * Return list of attributes sorted by their key value in {@code attributeMap}
-     * @return sorted list
-     */
-    public List<Attribute> getSortedAttributes() {
-        List<Attribute> list = new ArrayList<>();
-        ArrayList<Integer> indices = new ArrayList<>(attributesMap.keySet());
-        //indices.sort(Integer::compareTo);
-        Collections.sort(indices);
-        for (Integer index : indices) {
-            list.add(attributesMap.get(index));
-        }
-        return list;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/Graph.java b/sources/src/cz/zcu/kiv/offscreen/graph/Graph.java
deleted file mode 100644
index 3a06663..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/Graph.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import cz.zcu.kiv.offscreen.api.Edge;
-import cz.zcu.kiv.offscreen.api.Vertex;
-import org.apache.log4j.Logger;
-
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Class represents graph which is loaded from input JSON file.
- */
-public class Graph {
-
-    private Map<String, Vertex> vertices;
-    private List<Edge> edges;
-    private List<VertexArchetype> vertexArchetypes;
-    private List<EdgeArchetype> edgeArchetypes;
-    private List<AttributeType> attributeTypes;
-    private Map<String, List<String>> possibleEnumValues;
-    private List<String> defaultGroupArchetypes;
-    private Map<String, String> archetypeIcons;
-
-    private GraphState graphState;
-
-    private Logger logger = Logger.getLogger(Graph.class);
-
-    public Graph() {
-        logger.trace("ENTRY");
-        this.vertices = new HashMap<String, Vertex>();
-        this.edges = new LinkedList<Edge>();
-        logger.trace("EXIT");
-    }
-
-    public List<Edge> getEdges() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return edges;
-    }
-
-    public List<VertexArchetype> getVertexArchetypes() {
-        return vertexArchetypes;
-    }
-
-    public List<EdgeArchetype> getEdgeArchetypes() {
-        return edgeArchetypes;
-    }
-
-    public void setVertexArchetypes(List<VertexArchetype> vertexArchetypes) {
-        this.vertexArchetypes = vertexArchetypes;
-    }
-
-    public  void setEdgeArchetypes(List<EdgeArchetype> edgeArchetypes) {
-        this.edgeArchetypes = edgeArchetypes;
-    }
-
-    public void setAttributeTypes(List<AttributeType> attributeTypes) {
-        this.attributeTypes = attributeTypes;
-    }
-
-    public void setPossibleEnumValues(Map<Integer, List<String>> possibleEnumValues) {
-        this.possibleEnumValues = new HashMap<>();
-        for (Integer index : possibleEnumValues.keySet()) {
-            this.possibleEnumValues.put("" + index, possibleEnumValues.get(index));
-        }
-    }
-
-    public void setArchetypeIcons(Map<String, String> archetypeIcons) {
-        this.archetypeIcons = archetypeIcons;
-    }
-
-    public List<String> getDefaultGroupArchetypes() {
-        return defaultGroupArchetypes;
-    }
-
-    public void setDefaultGroupArchetypes(List<String> defaultGroupArchetypes) {
-        this.defaultGroupArchetypes = defaultGroupArchetypes;
-    }
-
-    public List<AttributeType> getAttributeTypes() {
-        return attributeTypes;
-    }
-
-    public Map<String, List<String>> getPossibleEnumValues() {
-        return possibleEnumValues;
-    }
-
-    public Map<String, String> getArchetypeIcons() {
-        return archetypeIcons;
-    }
-
-    public Map<String, Vertex> getVertices() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return vertices;
-    }
-
-    public void addEdge(Edge edge) {
-        logger.trace("ENTRY");
-        this.edges.add(edge);
-        logger.trace("EXIT");
-    }
-
-    public void addVertex(String name, Vertex vertex) {
-        logger.trace("ENTRY");
-        this.vertices.put(name, vertex);
-        logger.trace("EXIT");
-    }
-
-    public GraphState getGraphState() {
-        return graphState;
-    }
-
-    public void setGraphState(GraphState graphState) {
-        this.graphState = graphState;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/GraphManager.java b/sources/src/cz/zcu/kiv/offscreen/graph/GraphManager.java
deleted file mode 100644
index 116d2fe..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/GraphManager.java
+++ /dev/null
@@ -1,617 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import cz.zcu.kiv.offscreen.api.Edge;
-import cz.zcu.kiv.offscreen.api.Group;
-import cz.zcu.kiv.offscreen.api.SubedgeInfo;
-import cz.zcu.kiv.offscreen.api.Vertex;
-import cz.zcu.kiv.offscreen.graph.filter.*;
-import cz.zcu.kiv.offscreen.graph.loader.JSONConfigLoader;
-
-import java.util.*;
-
-public class GraphManager {
-
-    public enum AttributeDataType {
-        NUMBER {
-            @Override
-            public String toString() {
-                return "number";
-            }
-        },
-        DATE {
-            @Override
-            public String toString() {
-                return "date";
-            }
-        },
-        ENUM {
-            @Override
-            public String toString() {
-                return "enum";
-            }
-        },
-        STRING {
-            @Override
-            public String toString() {
-                return "string";
-            }
-        }
-    }
-
-    private int lastVertexOrGroupId = 1;
-
-    public List<VertexArchetype> vertexArchetypes = new ArrayList<>();
-    public List<EdgeArchetype> edgeArchetypes = new ArrayList<>();
-    public List<AttributeType> attributeTypes = new ArrayList<>();
-
-    /**
-     * the key is the attributeType index, the value is the list of possible values
-     */
-    private Map<Integer, List<String>> possibleEnumValues = new HashMap<>();
-
-    /**
-     * key is the archetype index, value is the set of vertices of the given archetype
-     */
-    public Map<Integer, HashSet<VertexImpl>> vertices = new HashMap<>();
-
-    /**
-     * key is the triplet of archetypes {fromVertex, edge, toVertex}, value is the list of edges for the given archetype triplet
-     */
-    public Map<EdgeArchetypeInfo, List<EdgeImpl>> edges = new HashMap<>();
-
-    public void addVertexArchetype(String name, String text) {
-        vertexArchetypes.add(new VertexArchetype(name, text));
-    }
-
-    public void addEdgeArchetype(String name, String text) {
-        edgeArchetypes.add(new EdgeArchetype(name, text));
-    }
-
-
-    public void addAttributeType(String name, AttributeDataType dataType, String text) {
-        attributeTypes.add(new AttributeType(name, dataType, text));
-    }
-
-    /**
-     * Adds a list of values to the possible values hashmap. All duplicated are
-     * removed.
-     *
-     * @param attributeTypeId - Id of attribute type
-     * @param values          - List of values of the corresponding attribute type
-     */
-    public void addUniquePossibleAttributeValues(int attributeTypeId, List<String> values) {
-        if (possibleEnumValues.containsKey(attributeTypeId)) {
-            List<String> attrValues = possibleEnumValues.get(attributeTypeId);
-            List<String> valuesWithoutDuplicates = new ArrayList<>(new HashSet<>(values)); // Converting to hashset removes duplicates
-            valuesWithoutDuplicates.removeAll(attrValues);   // Values to add without values already present in the hashmap
-            attrValues.addAll(valuesWithoutDuplicates);
-        } else {
-            possibleEnumValues.put(attributeTypeId, values);
-        }
-    }
-
-    public List<Integer> getEnumPositionsForAttrIndex(int attributeTypeId, List<String> enumValues) {
-        List<Integer> positions = new ArrayList<>();
-        if (!possibleEnumValues.containsKey(attributeTypeId)) {
-            return positions;
-        }
-
-        List<String> possibleValues = possibleEnumValues.get(attributeTypeId);
-        for (int i = 0; i < possibleValues.size(); i++) {
-            String possibleValue = possibleValues.get(i);
-            if (enumValues.contains(possibleValue)) {
-                positions.add(i);
-            }
-        }
-
-        return positions;
-    }
-
-    /**
-     * Gets string values from possible enums for attribute type id.
-     * @param attributeTypeId - Id of the attribute type
-     * @param valuePositions - List of positions in the possible enums hashmap for which to find the enum values.
-     * @return - List of string values of enums.
-     */
-    private List<String> getEnumStringsForAttrIndex(int attributeTypeId, List<Integer> valuePositions) {
-        List<String> values = new ArrayList<>();
-
-        List<String> possibleValues = possibleEnumValues.get(attributeTypeId);
-        for (int i = 0; i < possibleValues.size(); i++) {
-            if (valuePositions.contains(i)) {
-                values.add(possibleValues.get(i));
-            }
-        }
-
-        return values;
-    }
-
-    public AttributeType getAttributeDataTypeByName(String attributeName) {
-        return attributeTypes.get(getAttributeIndex(attributeName));
-    }
-
-    /**
-     * Adds a record to the possibleEnumValues hashset of the attributes possible values.
-     *
-     * @param attributeIndex - Index of the attribute for which to add the possible values
-     * @param possibleValues - All the possible values of the attribute
-     */
-    public void addEnumValues(int attributeIndex, List<String> possibleValues) {
-        possibleEnumValues.put(attributeIndex, possibleValues);
-    }
-
-    /**
-     * Creates a new vertex from input parameters and adds it to the map of
-     * vertices with the archetypeIndex as the key.
-     *
-     * @param id             - ID of the vertex to add
-     * @param title          - Title of the vertex
-     * @param text           - Text of the vertex
-     * @param archetypeIndex - Type of archetype associated with this vertex
-     * @param attributes     - Map of attributes associated with the vertex
-     */
-    public void addVertex(int id, String title, String text, int archetypeIndex, Map<Integer, Attribute> attributes) {
-        VertexImpl vertexToAdd = new VertexImpl(id, id, title, archetypeIndex, text);
-        if (vertices.containsKey(archetypeIndex)) {
-            vertices.get(archetypeIndex).add(vertexToAdd);
-        } else {
-            HashSet<VertexImpl> vertexSet = new HashSet<>();
-            vertexSet.add(vertexToAdd);
-            vertices.put(archetypeIndex, vertexSet);
-        }
-
-        vertexToAdd.addAttributes(attributes);
-    }
-
-    /**
-     * Creates a new edge from input parameters and adds it to the map of
-     * edges with the archetypeIndex as the key.
-     *
-     * @param id            - ID of the edge to add
-     * @param from          - ID of the vertex the edge comes from
-     * @param to            - ID of the vertex the edge points to
-     * @param text          - Text of edge
-     * @param archetypeInfo - The archetype information associated with this edge
-     * @param attributes    - Map of attributes associated with the edge
-     */
-    public void addEdge(int id, int from, int to, String text, EdgeArchetypeInfo archetypeInfo, Map<Integer, Attribute> attributes) {
-        EdgeImpl edgeToAdd = new EdgeImpl(id, from, to, text, id, archetypeInfo.edgeArchetypeIndex);
-        edgeToAdd.addAttributes(attributes);
-
-        if (edges.containsKey(archetypeInfo)) {
-            edges.get(archetypeInfo).add(edgeToAdd);
-        } else {
-            List<EdgeImpl> edgesList = new ArrayList<>();
-            edgesList.add(edgeToAdd);
-            edges.put(archetypeInfo, edgesList);
-        }
-    }
-
-    /**
-     * returns the index of a given enum value in the list of the possible enum values
-     * @param value the enum value
-     * @return index in the list of possible enum values or -1 if the value is not in the list
-     */
-    public int getEnumValueIndex(int attributeTypeIndex, String value) {
-        int index = -1;
-        List<String> values = possibleEnumValues.get(attributeTypeIndex);
-        for (int i = 0; i < values.size(); i++) {
-            if (values.get(i).equals(value)) {
-                index = i;
-                break;
-            }
-        }
-        return index;
-    }
-
-    /**
-     * returns the index of an attribute with a given name in the attributeTypes list
-     * @param name the name of the attribute
-     * @return the attribute index or -1 if there is no attribute with such a name
-     */
-    public int getAttributeIndex(String name) {
-        int index = -1;
-        for (int i = 0; i < attributeTypes.size(); i++) {
-            if (attributeTypes.get(i).name.equals(name)) {
-                index = i;
-                break;
-            }
-        }
-        return index;
-    }
-
-    /**
-     * returns the index of an archetype with a given name in the vertexArchetypes list
-     * @param archetypeName name of the archetype
-     * @return the index or -1 if there is no archetype with the given name in the list
-     */
-    public int getVertexArchetypeIndex(String archetypeName) {
-        int index = -1;
-        for (int i = 0; i < vertexArchetypes.size(); i++) {
-            if (vertexArchetypes.get(i).name.equals(archetypeName)) {
-                index = i;
-                break;
-            }
-        }
-        return index;
-    }
-
-    /**
-     * returns the index of an archetype with a given name in the edgeArchetypes list
-     * @param archetypeName name of the archetype
-     * @return the index or -1 if there is no archetype with the given name in the list
-     */
-    public int getEdgeArchetypeIndex(String archetypeName) {
-        int index = -1;
-        for (int i = 0; i < edgeArchetypes.size(); i++) {
-            if (edgeArchetypes.get(i).name.equals(archetypeName)) {
-                index = i;
-                break;
-            }
-        }
-        return index;
-    }
-
-    /**
-     * Filters the edges and vertices according to the default filter loaded from the configuration file
-     * and constructs the {@code Graph} object.
-     * @param configLoader - The object that loads the configuration file.
-     * @return - Constructed {@code Graph} object.
-     */
-    public Graph createGraph(JSONConfigLoader configLoader) {
-        Graph graph = new Graph();
-
-        // To use default filter from a configuration file
-        GraphFilter filter = configLoader.loadDefaultFilter();
-        if (filter == null) {
-            // To Enable Everything
-            filter = new GraphFilter();
-            filter.setVertexArchetypeFilter(new ArrayList<Integer>(), GraphFilter.ArchetypeMatchType.NON_MATCHING);
-            filter.setEdgeArchetypeFilter(new ArrayList<EdgeArchetypeInfo>(), GraphFilter.ArchetypeMatchType.NON_MATCHING);
-        }
-
-        Map<String, String> archetypeIcons = configLoader.loadArchetypeIcons();
-        graph.setArchetypeIcons(archetypeIcons);
-
-        List<String> defaultGroupArchetypes = configLoader.loadGroupArchetypesStrings();
-        graph.setDefaultGroupArchetypes(defaultGroupArchetypes);
-
-
-
-
-        Set<VertexImpl> resultVertices = getVerticesByArchetypeFilter(filter);
-
-        resultVertices = getVerticesByAttributeFilter(filter, resultVertices);
-
-        List<EdgeImpl> resultEdges = getEdgesByArchetypeFilter(filter, resultVertices);
-
-        resultEdges = getEdgesByAttributeFilter(filter, resultEdges);
-
-        addVerticesToGraph(graph, resultVertices);
-
-        addEdgesToGraph(graph, resultEdges);
-
-        graph.setAttributeTypes(attributeTypes);
-        graph.setPossibleEnumValues(possibleEnumValues);
-
-        graph.setGraphState(createGraphState(graph));
-
-        return graph;
-    }
-
-    /**
-     * Gets filtered vertices by attributes.
-     * @param filter - Filter object.
-     * @param vertices - List of vertices for filtration.
-     * @return - List of vertices filtered by attribute.
-     */
-    private Set<VertexImpl> getVerticesByAttributeFilter(GraphFilter filter, Set<VertexImpl> vertices) {
-        Set<VertexImpl> resultVertices = new HashSet<>();
-        for (VertexImpl vertex : vertices) {
-            boolean filterPassed = true;
-            AttributeFilter attributeFilter = filter.getVertexAttributeFilter(vertex.getArchetype());
-            if (attributeFilter != null) {
-                // Iterate through all attributes of the vertex
-                for (int attributeIndex : vertex.getAttributesMap().keySet()) {
-                    Attribute vertexAttribute = vertex.getAttributesMap().get(attributeIndex);
-
-                    filterPassed = (filterPassed && checkAttributeFiltersPassed(vertexAttribute, attributeFilter, attributeIndex));
-                    if (!filterPassed) break;   // filter did not pass
-                }
-            }
-            if (filterPassed)
-                resultVertices.add(vertex);
-        }
-        return resultVertices;
-    }
-
-    /**
-     * Gets filtered edges by attribute.
-     * @param filter - Filter object.
-     * @param edges - List of edges for filtration.
-     * @return - List of edges filtered by attribute.
-     */
-    private List<EdgeImpl> getEdgesByAttributeFilter(GraphFilter filter, List<EdgeImpl> edges) {
-        List<EdgeImpl> resultEdges = new ArrayList<>();
-        for (EdgeImpl edge : edges) {
-            boolean filterPassed = true;
-            AttributeFilter attributeFilter = filter.getEdgeAttributeFilter(edge.getArchetype());
-            if (attributeFilter != null) {
-                // Iterate through all attributes of the edge
-                for (int attributeIndex : edge.getAttributesMap().keySet()) {
-                    Attribute edgeAttribute = edge.getAttributesMap().get(attributeIndex);
-
-                    filterPassed = (filterPassed && checkAttributeFiltersPassed(edgeAttribute, attributeFilter, attributeIndex));
-                    if (!filterPassed) break;   // filter did not pass
-                }
-            }
-            if (filterPassed)
-                resultEdges.add(edge);
-        }
-
-        return resultEdges;
-    }
-
-    /**
-     * Filters the attribute by its attribute filters and checks if it passed.
-     * @param vertexAttribute - Attribute object to filter.
-     * @param attributeFilter - Attribute filter of the attribute.
-     * @param attributeIndex - Index of the attribute.
-     * @return - true if passed the filter, else false.
-     */
-    private boolean checkAttributeFiltersPassed(Attribute vertexAttribute, AttributeFilter attributeFilter, int attributeIndex) {
-        AttributeDataType attributeType = attributeTypes.get(vertexAttribute.getTypeIndex()).dataType;
-
-        boolean filterPassed;
-        ITypeAttributeFilter typeFilter = null;
-        switch (attributeType) {
-            case NUMBER:
-                typeFilter = attributeFilter.getNumberFilter(attributeIndex);
-                break;
-            case DATE:
-                typeFilter = attributeFilter.getDateFilter(attributeIndex);
-                break;
-            case ENUM:
-                typeFilter = attributeFilter.getEnumFilter(attributeIndex);
-                break;
-            case STRING:
-                typeFilter = attributeFilter.getStringFilter(attributeIndex);
-                break;
-        }
-        if (typeFilter == null) { // No filters mean pass
-            return true;
-        }
-
-        filterPassed = typeFilter.filter(vertexAttribute.getValue());
-
-        return filterPassed;
-    }
-
-    /**
-     * Filters vertices by archetype from the specified filter object.
-     *
-     * @param filter - Filter to be applied to the vertices.
-     * @return A list of vertices filtered by the specified filter object.
-     */
-    private HashSet<VertexImpl> getVerticesByArchetypeFilter(GraphFilter filter) {
-        HashSet<VertexImpl> resultVertices = new HashSet<>();
-
-        VertexArchetypeFilter vertexArchetypeFilter = filter.getVertexArchetypeFilter();
-        List<Integer> archetypesFiltered = vertexArchetypeFilter.archetypeIndeces;
-        switch (vertexArchetypeFilter.matchType) {
-            case MATCHING:
-                for (Integer vertexArchetypeIndex : vertices.keySet()){
-                    if (archetypesFiltered.contains(vertexArchetypeIndex)) {
-                        resultVertices.addAll(vertices.get(vertexArchetypeIndex));
-                    }
-                }
-                break;
-            case NON_MATCHING:
-                for (Integer vertexArchetypeIndex : vertices.keySet()){
-                    if (!archetypesFiltered.contains(vertexArchetypeIndex)) {
-                        resultVertices.addAll(vertices.get(vertexArchetypeIndex));
-                    }
-                }
-                break;
-        }
-
-        return resultVertices;
-    }
-
-    /**
-     * Filters edges by archetype from the specified filter object. Also removes all edges that contain either a vertex
-     * from which the edge originates or to which the edge leads.
-     *
-     * @param filter         - Filter to be applied to the edges list.
-     * @param resultVertices - List of vertices which should be present in the result graph.
-     * @return A list of edges filtered by the specified filter object
-     */
-    private List<EdgeImpl> getEdgesByArchetypeFilter(GraphFilter filter, Set<VertexImpl> resultVertices) {
-        List<EdgeImpl> resultEdges = new ArrayList<>();
-
-        EdgeArchetypeFilter edgeArchetypeFilter = filter.getEdgeArchetypeFilter();
-        List<EdgeArchetypeInfo> edgeInfosFiltered = edgeArchetypeFilter.archetypeIndeces;
-        switch (edgeArchetypeFilter.matchType) {
-            case MATCHING:
-                for (EdgeArchetypeInfo edgeInfo : edges.keySet()){
-                    if (edgeInfosFiltered.contains(edgeInfo)) {
-                        resultEdges.addAll(edges.get(edgeInfo));
-                    }
-                }
-                break;
-            case NON_MATCHING:
-                for (EdgeArchetypeInfo edgeInfo : edges.keySet()){
-                    if (!edgeInfosFiltered.contains(edgeInfo)) {
-                        resultEdges.addAll(edges.get(edgeInfo));
-                    }
-                }
-                break;
-        }
-
-        Iterator<EdgeImpl> i = resultEdges.iterator();
-        while (i.hasNext()) {
-            EdgeImpl edge = i.next();
-
-            VertexImpl toDummy = new VertexImpl(edge.getTo(), edge.getTo(), null, -1,null);
-            VertexImpl fromDummy = new VertexImpl(edge.getFrom(), edge.getFrom(), null, -1, null);
-
-            if (!resultVertices.contains(toDummy) || !resultVertices.contains(fromDummy)){
-                i.remove();
-            }
-        }
-
-        return resultEdges;
-    }
-
-    /**
-     * Adds edges to graph.
-     *
-     * Edges are equal when their attributes from and to are equal. Equal edges are combined and their differences
-     * are saved in list of SubedgeInfo.
-     *
-     * @param graph - graph to which add the edges
-     * @param resultEdges - List of edges to add to the graph.
-     */
-    private void addEdgesToGraph(Graph graph, List<EdgeImpl> resultEdges) {
-        HashMap<EdgeImpl, List<SubedgeInfo>> edgeSet = new HashMap<>();
-
-        for (EdgeImpl edgeImpl : resultEdges) {
-            List<String[]> attributes = getAttributesAsArray(edgeImpl.getSortedAttributes());
-            SubedgeInfo subedgeInfo = new SubedgeInfo(edgeImpl.getOriginalId(), edgeImpl.getArchetype(), attributes);
-
-            if (edgeSet.containsKey(edgeImpl)) {
-                edgeSet.get(edgeImpl).add(subedgeInfo);
-            } else {
-                List<SubedgeInfo> subEdgeInfoList = new ArrayList<>();
-                subEdgeInfoList.add(subedgeInfo);
-                edgeSet.put(edgeImpl, subEdgeInfoList);
-            }
-        }
-
-        int idCounter = 1;
-        for (EdgeImpl edgeImpl : edgeSet.keySet()) {
-            Edge edge = new Edge(idCounter++, edgeImpl.getFrom(), edgeImpl.getTo(), edgeImpl.getText(), edgeSet.get(edgeImpl));
-            graph.addEdge(edge);
-        }
-        graph.setVertexArchetypes(vertexArchetypes);
-        graph.setEdgeArchetypes(edgeArchetypes);
-    }
-
-    /**
-     * Adds vertices to the graph.
-     * @param graph - Graph to which add the vertices.
-     * @param resultVertices - List of vertices to add to the graph.
-     */
-    private void addVerticesToGraph(Graph graph, Set<VertexImpl> resultVertices) {
-        for (VertexImpl vertexImpl : resultVertices) {
-
-            VertexArchetype archetype = vertexArchetypes.get(vertexImpl.getArchetype());
-            String title = archetype.name + ":" + vertexImpl.getTitle();
-            List<String[]> attributes = getAttributesAsArray(vertexImpl.getSortedAttributes());
-
-            Vertex vertex = new Vertex(lastVertexOrGroupId++, vertexImpl.getOriginalId(), title, vertexImpl.getArchetype(), vertexImpl.getText(), attributes);
-
-            graph.addVertex("" + vertexImpl.getId(), vertex);
-        }
-    }
-
-    private List<String[]> getAttributesAsArray(List<Attribute> sortedAttributes) {
-        ArrayList<String[]> attributes = new ArrayList<>();
-
-        for (Attribute attr : sortedAttributes) {
-            String attrName = attributeTypes.get(attr.getTypeIndex()).name;
-            AttributeDataType attrType = attributeTypes.get(attr.getTypeIndex()).dataType;
-
-            StringBuilder attrValue = getAttributeValue(attr, attrType);
-            attributes.add(new String[]{attrName, attrValue.toString()});
-        }
-        return attributes;
-    }
-
-    /**
-     * Gets the string value of attribute by its data type.
-     * @param attr - Attribute object from which to extract the value.
-     * @param attrType - Data type of the attribute.
-     * @return - String value of the attribute.
-     */
-    private StringBuilder getAttributeValue(Attribute attr, AttributeDataType attrType) {
-        StringBuilder attrValue;
-        switch (attrType) {
-            case NUMBER:
-                attrValue = new StringBuilder(attr.getValue().toString());
-                break;
-            case DATE:
-                attrValue = new StringBuilder(attr.getValue().toString());
-                break;
-            case ENUM: // Enum attribute type must be a list of integers!
-                List<Integer> valuePositions = (List<Integer>) attr.getValue();
-                List<String> values = getEnumStringsForAttrIndex(attr.getTypeIndex(), valuePositions);
-
-                attrValue = new StringBuilder();
-                for (int j = 0; j < values.size(); j++) {
-                    attrValue.append(values.get(j));
-                    if (j < values.size() - 1)
-                        attrValue.append(", ");
-                }
-                break;
-            default:
-                attrValue = new StringBuilder(attr.getValue().toString());
-                break;
-        }
-        return attrValue;
-    }
-
-    /**
-     * Method is used for initialization of default graph status based on input graph.
-     *
-     * @param graph graph where are set vertices, defaultGroupArchetypes and vertexArchetypes.
-     * @return instance of created GraphState
-     */
-    private GraphState createGraphState(Graph graph) {
-        GraphState state = new GraphState();
-
-        state.addGroupsAll(createDefaultGroups(graph));
-
-
-        return state;
-    }
-
-    /**
-     * Method create list of groups based on defaultGroupArchetypes whose are defined in graph. Vertices are taken
-     * from graph too.
-     *
-     * @param graph graph from which are groups created.
-     * @return created list of groups or empty list.
-     */
-    private Collection<Group> createDefaultGroups(Graph graph){
-
-        Map<Integer, Group> groups = new HashMap<>();
-        int groupId = 1;
-
-        // find index of vertex archetypes names
-        int index = 0;
-        for(VertexArchetype archetype : graph.getVertexArchetypes()){
-            if(graph.getDefaultGroupArchetypes().contains(archetype.name)){
-                groups.put(index, new Group(groupId++, lastVertexOrGroupId++, archetype.name));
-            }
-            index++;
-        }
-
-        // find vertices with founded vertex archetypes indices
-        for (Vertex vertex : graph.getVertices().values()){
-            if(groups.keySet().contains(vertex.getArchetype())){
-                groups.get(vertex.getArchetype()).addVertexId(vertex.getId());
-            }
-        }
-
-        // remove groups without vertices
-        List<Group> groupList = new ArrayList<>();
-        for(Group group : groups.values()){
-            if (!group.getVerticesId().isEmpty()){
-                groupList.add(group);
-            }
-        }
-
-        return groupList;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/GraphState.java b/sources/src/cz/zcu/kiv/offscreen/graph/GraphState.java
deleted file mode 100644
index 00bb25e..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/GraphState.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import cz.zcu.kiv.offscreen.api.Group;
-import cz.zcu.kiv.offscreen.api.Position;
-import cz.zcu.kiv.offscreen.api.SideBar;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class GraphState {
-
-    private List<Group> groups = new ArrayList<>();
-    private List<Position> positions = new ArrayList<>();
-    private List<SideBar> sideBar = new ArrayList<>();
-    private int selectedVertex;
-    private int selectedEdge;
-
-
-    public List<Group> getGroups() {
-        return groups;
-    }
-
-    public List<Position> getPositions() {
-        return positions;
-    }
-
-    public List<SideBar> getSideBar() {
-        return sideBar;
-    }
-
-    public int getSelectedVertex() {
-        return selectedVertex;
-    }
-
-    public int getSelectedEdge() {
-        return selectedEdge;
-    }
-
-    public void addGroup(Group group){
-        this.groups.add(group);
-    }
-
-    public void addPosition(Position position){
-        this.positions.add(position);
-    }
-
-    public void addSideBar(SideBar sideBar){
-        this.sideBar.add(sideBar);
-    }
-
-    public void addGroupsAll(Collection<Group> collection){
-        this.groups.addAll(collection);
-    }
-
-    public void addPositionsAll(Collection<Position> collection){
-        this.positions.addAll(collection);
-    }
-
-    public void addSideBarsAll(Collection<SideBar> collection){
-        this.sideBar.addAll(collection);
-    }
-
-    public void setSelectedVertex(int selectedVertex) {
-        this.selectedVertex = selectedVertex;
-    }
-
-    public void setSelectedEdge(int selectedEdge) {
-        this.selectedEdge = selectedEdge;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/VertexArchetype.java b/sources/src/cz/zcu/kiv/offscreen/graph/VertexArchetype.java
deleted file mode 100644
index f29d35c..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/VertexArchetype.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-public class VertexArchetype {
-    public String name;
-    public String text;
-
-    VertexArchetype(String name, String text) {
-        this.name = name;
-        this.text = text;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String getText() {
-        return text;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/VertexImpl.java b/sources/src/cz/zcu/kiv/offscreen/graph/VertexImpl.java
deleted file mode 100644
index 4c6a7bb..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/VertexImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package cz.zcu.kiv.offscreen.graph;
-
-import cz.zcu.kiv.offscreen.api.BaseVertex;
-import java.util.*;
-
-/**
- * Class represents vertex which is used for input JSON format.
- */
-public class VertexImpl extends BaseVertex {
-
-    /** Map contains attributes stored in key value format. Key is index to array of attribute types defined in input file */
-    private Map<Integer, Attribute> attributesMap;
-
-    /**
-     * Creates new vertex.
-     * @param id new generated identification number.
-     * @param originalId original identification number from input file
-     * @param title title of vertex
-     * @param archetypeIndex index of vertex archetype
-     * @param text additional info
-     */
-    public VertexImpl(int id, int originalId, String title, int archetypeIndex, String text) {
-        super(id, originalId, title, archetypeIndex, text);
-        this.attributesMap = new HashMap<>();
-    }
-
-    public void addAttribute(int attrTypeIndex, Object value) {
-        Attribute attr = new Attribute(attrTypeIndex, value);
-        attributesMap.put(attrTypeIndex, attr);
-    }
-
-    public void addAttributes(Map<Integer, Attribute> attributes) {
-        this.attributesMap.putAll(attributes);
-    }
-
-    public Attribute getAttribute(int attrTypeIndex) {
-        return attributesMap.get(attrTypeIndex);
-    }
-
-    public Map<Integer, Attribute> getAttributesMap(){
-        return attributesMap;
-    }
-
-    /**
-     * Return list of attributes sorted by their key value in {@code attributeMap}
-     * @return sorted list
-     */
-    public List<Attribute> getSortedAttributes() {
-        List<Attribute> list = new ArrayList<>();
-        ArrayList<Integer> indices = new ArrayList<>(attributesMap.keySet());
-        //indices.sort(Integer::compareTo);
-        Collections.sort(indices);
-        for (int index : indices) {
-            list.add(attributesMap.get(index));
-        }
-        return list;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/creator/EfpGraphTransfomer.java b/sources/src/cz/zcu/kiv/offscreen/graph/creator/EfpGraphTransfomer.java
deleted file mode 100644
index fb8f0eb..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/creator/EfpGraphTransfomer.java
+++ /dev/null
@@ -1,397 +0,0 @@
-//package cz.zcu.kiv.offscreen.graph.creator;
-//
-//import java.util.ArrayList;
-//import java.util.HashMap;
-//import java.util.List;
-//import java.util.Map;
-//
-//import org.apache.log4j.Logger;
-//
-//import cz.zcu.kiv.efps.comparator.result.EfpEvalResult.MatchingResult;
-//import cz.zcu.kiv.offscreen.api.EdgeInterface;
-//import cz.zcu.kiv.offscreen.api.GraphInterface;
-//import cz.zcu.kiv.offscreen.api.VertexInterface;
-//import cz.zcu.kiv.offscreen.data.efpportal.CocaexData;
-//import cz.zcu.kiv.offscreen.data.efpportal.CocaexDataEfp;
-//import cz.zcu.kiv.offscreen.data.efpportal.CocaexDataFeature;
-//import cz.zcu.kiv.offscreen.data.efpportal.CocaexWrapper;
-//import cz.zcu.kiv.offscreen.graph.EdgeEfp;
-//import cz.zcu.kiv.offscreen.graph.GraphImpl;
-//import cz.zcu.kiv.offscreen.graph.VertexEfp;
-//import cz.zcu.kiv.offscreen.graph.efp.EfpComparison;
-//import cz.zcu.kiv.offscreen.graph.efp.EfpFeature;
-//
-///**
-// *
-// * Transforms data obtained in form of Map<String, CocaexData> to
-// * cz.zcu.kiv.offscreen.api.GraphInterface.
-// *
-// * @author Jiri Loudil
-// *
-// */
-//public class EfpGraphTransfomer {
-//
-//	private final String DELIMITER = ";";
-//
-//	/**
-//	 * Output data format.
-//	 */
-//	private GraphInterface graph = null;
-//
-//	/**
-//	 * Input data format.
-//	 */
-//	private Map<String, CocaexData> resultData = null;
-//
-//	private Map<String, String> resultFeaturesMapping = null;
-//
-//	private Map<String, String> resultEfpsMapping = null;
-//
-//	/**
-//	 * Already used vertices.
-//	 */
-//	private Map<String, VertexInterface> vertexMap;
-//
-//	/**
-//	 * Already used features.
-//	 */
-//	private Map<String, EfpFeature> featureMap;
-//
-//	/**
-//	 * Logging.
-//	 */
-//	private Logger logger = Logger.getLogger(EfpGraphTransfomer.class);
-//
-//	/**
-//	 * New transformer from input data.
-//	 *
-//	 * @param efpportalResultsWrapper
-//	 *            Input data in from of EfpPortal app.
-//	 */
-//	public EfpGraphTransfomer(CocaexWrapper efpportalResultsWrapper) {
-//		logger.trace("ENTRY");
-//		this.graph = new GraphImpl();
-//
-//		this.resultData = efpportalResultsWrapper.getData();
-//		this.resultEfpsMapping = efpportalResultsWrapper.getEfpMappings();
-//		this.resultFeaturesMapping = efpportalResultsWrapper
-//				.getFeatureMappings();
-//
-//		this.vertexMap = new HashMap<String, VertexInterface>();
-//		this.featureMap = new HashMap<String, EfpFeature>();
-//
-//		logger.trace("EXIT");
-//	}
-//
-//	/**
-//	 * Generates the graph with vertices and edges.
-//	 *
-//	 * @return graph
-//	 */
-//	public GraphInterface transform() {
-//		logger.trace("ENTRY");
-//		this.generateVertices();
-//		this.generateEdges();
-//
-//		// set proper feature and efp names
-//		this.setNamesInsteadOfNumbers();
-//		logger.trace("EXIT");
-//
-//		return this.graph;
-//	}
-//
-//	/**
-//	 * Substitute ID for the proper name string.
-//	 */
-//	private void setNamesInsteadOfNumbers() {
-//		logger.trace("ENTRY");
-//
-//		List<EdgeInterface> edges = graph.getEdges();
-//
-//		for (EdgeInterface edgeInterface : edges) {
-//			ArrayList<EfpFeature> features = ((EdgeEfp) edgeInterface)
-//					.getFeatures();
-//
-//			for (EfpFeature efpFeature : features) {
-//				// substitute ID for the true name from the feature mapping
-//				String tmpFeatureName = resultFeaturesMapping.get(efpFeature.getName());
-//
-//				efpFeature.setName(tmpFeatureName.split(DELIMITER)[1]);
-//
-//				ArrayList<EfpComparison> efps = efpFeature.getEfps();
-//
-//				for (EfpComparison efpComparison : efps) {
-//					// substitute ID for the true name from the efps mapping
-//					efpComparison.setEfpName(resultEfpsMapping
-//							.get(efpComparison.getEfpName()));
-//				}
-//			}
-//		}
-//
-//		logger.trace("EXIT");
-//	}
-//
-//	/**
-//	 * Generate vertices for this graph.
-//	 */
-//	private void generateVertices() {
-//		logger.trace("ENTRY");
-//
-//		int id = 0;
-//		VertexEfp vertex;
-//
-//		for (Map.Entry<String, CocaexData> tmpData : resultData.entrySet()) {
-//			id++;
-//
-//			vertex = new VertexEfp(id, tmpData.getKey(), tmpData.getKey());
-//
-//			this.graph.addVertex(tmpData.getKey(), vertex);
-//			this.vertexMap.put(tmpData.getKey(), vertex);
-//		}
-//
-//		logger.trace("EXIT");
-//	}
-//
-//	/**
-//	 * Generate edges for this graph.
-//	 */
-//	private void generateEdges() {
-//		logger.trace("ENTRY");
-//
-//		int id = 0;
-//		String from, to;
-//		CocaexData currentEvaluatedVertexData;
-//
-//		for (Map.Entry<String, VertexInterface> currentVertex : vertexMap
-//				.entrySet()) {
-//			currentEvaluatedVertexData = resultData.get(currentVertex.getKey());
-//
-//			to = currentVertex.getKey();
-//
-//			// all required features FROM
-//			for (Map.Entry<String, CocaexDataFeature> tmpRequired : currentEvaluatedVertexData
-//					.getRequiredFeatures().entrySet()) {
-//
-//				String requiredFeatureName = this.resultFeaturesMapping
-//						.get(tmpRequired.getKey());
-//
-//				// get feature name, its first part is component name
-//				String[] requiredSplits = requiredFeatureName.split(DELIMITER);
-//
-//				// not-connected ones are left over
-//				if (!requiredSplits[0].isEmpty()) {
-//
-//					// vertex from == vertex to -> we dont want that...
-//					if (requiredSplits[0].equals(currentVertex.getKey())) {
-//						continue;
-//					}
-//
-//					// find corresponding feature on the TO vertex
-//					CocaexData otherVertexData = resultData
-//							.get(requiredSplits[0]);
-//					CocaexDataFeature otherVertexFeature = null;
-//
-//					// go through all features of the TO
-//					for (Map.Entry<String, CocaexDataFeature> tmpProvided : otherVertexData
-//							.getProvidedFeatures().entrySet()) {
-//						String providedFeatureName = this.resultFeaturesMapping
-//								.get(tmpProvided.getKey());
-//
-//						String[] providedSplits = providedFeatureName
-//								.split(DELIMITER);
-//
-//						// not-connected ones are left over
-//						if (providedSplits[0].isEmpty()) {
-//							continue;
-//						}
-//
-//						// found matching feature between TO and FROM
-//						if (providedSplits[0].equals(currentVertex.getKey())
-//								&& providedSplits[1].equals(requiredSplits[1])) {
-//							otherVertexFeature = tmpProvided.getValue();
-//						}
-//					}
-//
-//					from = requiredSplits[0];
-//
-//					EdgeEfp edge = findEdgeInGraph(from, to);
-//
-//					// add new edge
-//					if (edge == null) {
-//						edge = new EdgeEfp(++id, from, to);
-//						// from to
-//						checkAddEdgeFeature(tmpRequired.getValue(),
-//								otherVertexFeature, tmpRequired.getKey(), edge);
-//
-//						this.graph.addEdge(edge);
-//					} else {
-//						// add a feature to an old edge only
-//						checkAddEdgeFeature(tmpRequired.getValue(),
-//								otherVertexFeature, tmpRequired.getKey(), edge);
-//					}
-//				}
-//
-//			}
-//		}
-//
-//		logger.trace("EXIT");
-//	}
-//
-//	/**
-//	 *
-//	 * Find an existing edge in graph.
-//	 *
-//	 * @param from
-//	 *            Name of start vertex.
-//	 * @param to
-//	 *            name of end vertex.
-//	 * @return Null if not found, edge otherwise.
-//	 */
-//	private EdgeEfp findEdgeInGraph(String from, String to) {
-//		logger.trace("ENTRY");
-//		List<EdgeInterface> tmpEdges = this.graph.getEdges();
-//
-//		for (EdgeInterface edge : tmpEdges) {
-//			// found old edge
-//			if (edge.getFrom().equals(from) && edge.getTo().equals(to)) {
-//				logger.trace("EXIT");
-//				return (EdgeEfp) edge;
-//			}
-//		}
-//
-//		logger.trace("EXIT");
-//		return null;
-//	}
-//
-//	/**
-//	 *
-//	 * Check and add feature to edge.
-//	 *
-//	 * @param requiredFeature
-//	 *            Required feature with EFPs.
-//	 * @param providedFeature
-//	 *            Provided feature with EFPs.
-//	 * @param name
-//	 *            Feature name.
-//	 * @param edge
-//	 *            Edge where the feature belongs.
-//	 */
-//	private void checkAddEdgeFeature(CocaexDataFeature requiredFeature,
-//			CocaexDataFeature providedFeature, String name, EdgeEfp edge) {
-//		logger.trace("ENTRY");
-//		EfpFeature tmpFeature = null;
-//
-//		// find out if the edge already has a features like the added one
-//		for (EfpFeature oldFeature : edge.getFeatures()) {
-//			// the edge contains the feature already
-//			if (oldFeature.getName().equals(name)) {
-//				tmpFeature = oldFeature;
-//				break;
-//			}
-//		}
-//
-//		// an old feature
-//		if (tmpFeature != null) {
-//			tmpFeature = featureMap.get(name);
-//
-//			processEfpsToFeature(requiredFeature, providedFeature, tmpFeature,
-//					edge);
-//		} else { // add new feature to edge
-//			tmpFeature = new EfpFeature(name);
-//
-//			// preset the OK state
-//			tmpFeature.setFeatureStatus(MatchingResult.OK.toString());
-//
-//			processEfpsToFeature(requiredFeature, providedFeature, tmpFeature,
-//					edge);
-//
-//			edge.getFeatures().add(tmpFeature);
-//			featureMap.put(name, tmpFeature);
-//		}
-//		logger.trace("EXIT");
-//	}
-//
-//	/**
-//	 *
-//	 * Prepare process of adding EFP values to existing feature.
-//	 *
-//	 * @param requiredFeature
-//	 *            Required feature with EFPs.
-//	 * @param providedFeature
-//	 *            Provided feature with EFPs.
-//	 * @param feature
-//	 *            Existing feature.
-//	 * @param edge
-//	 *            Edge where the EFPs with feature belong.
-//	 */
-//	private void processEfpsToFeature(CocaexDataFeature requiredFeature,
-//			CocaexDataFeature providedFeature, EfpFeature feature, EdgeEfp edge) {
-//		logger.trace("ENTRY");
-//
-//		MatchingResult result = checkAddFeatureEfp(requiredFeature,
-//				providedFeature, feature);
-//
-//		if (!result.equals(MatchingResult.OK)) {
-//			edge.setEdgeStatusOk(false);
-//			feature.setFeatureStatus(result.toString());
-//		}
-//
-//		logger.trace("EXIT");
-//	}
-//
-//	/**
-//	 *
-//	 * Check and add EFPs to an existing feature.
-//	 *
-//	 * @param requiredFeature
-//	 *            Required feature with EFPs.
-//	 * @param providedFeature
-//	 *            Provided feature with EFPs.
-//	 * @param feature
-//	 *            Existing feature.
-//	 * @return Result of EFPs comparison. OK/MISSING/ERROR
-//	 */
-//	private MatchingResult checkAddFeatureEfp(
-//			CocaexDataFeature requiredFeature,
-//			CocaexDataFeature providedFeature, EfpFeature feature) {
-//		logger.trace("ENTRY");
-//		final String defaultValue = "No value";
-//
-//		MatchingResult output = MatchingResult.OK;
-//
-//		// all EFPs bound to this feature
-//		for (int i = 0; i < requiredFeature.getEfps().size(); i++) {
-//			EfpComparison efpCmp = new EfpComparison();
-//
-//			CocaexDataEfp firstEfp = requiredFeature.getEfps().get(i);
-//			CocaexDataEfp secondEfp = providedFeature.getEfps().get(i);
-//
-//			// set real values
-//			if (firstEfp.getEfpValue() != null) {
-//				efpCmp.setLeftEfpValue(firstEfp.getEfpValue().toString());
-//			} else {
-//				efpCmp.setLeftEfpValue(defaultValue);
-//			}
-//
-//			if (secondEfp.getEfpValue() != null) {
-//				efpCmp.setRightEfpValue(secondEfp.getEfpValue().toString());
-//			} else {
-//				efpCmp.setRightEfpValue(defaultValue);
-//			}
-//
-//			efpCmp.setTypeName(firstEfp.getEfpValueTypeName());
-//			efpCmp.setEfpName(firstEfp.getEfpName());
-//			efpCmp.setComparisonStatus(firstEfp.getTypeError().name());
-//
-//			// at least one efp is not OK
-//			if (!firstEfp.getTypeError().equals(MatchingResult.OK)) {
-//				output = firstEfp.getTypeError();
-//			}
-//
-//			feature.getEfps().add(efpCmp);
-//		}
-//		logger.trace("EXIT");
-//
-//		return output;
-//	}
-//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphGenerator.java b/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphGenerator.java
deleted file mode 100644
index 06b43f6..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphGenerator.java
+++ /dev/null
@@ -1,96 +0,0 @@
-//package cz.zcu.kiv.offscreen.graph.creator;
-//
-//import cz.zcu.kiv.offscreen.api.EdgeInterface;
-//import cz.zcu.kiv.offscreen.api.GraphInterface;
-//import cz.zcu.kiv.offscreen.api.VertexInterface;
-//import cz.zcu.kiv.offscreen.graph.EdgeImpl;
-//import cz.zcu.kiv.offscreen.graph.GraphImpl;
-//import cz.zcu.kiv.offscreen.graph.VertexImpl;
-//import java.security.InvalidParameterException;
-//import java.util.Random;
-//import org.apache.log4j.Logger;
-//
-///**
-// * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
-// */
-//public class GraphGenerator {
-//
-//    private final int COUNT_OF_VERTICES;
-//    private final int COUNT_OF_EDGES;
-//    private GraphInterface graph;
-//    private boolean[][] conectionGraph;
-//
-//    private Logger logger = Logger.getLogger(GraphGenerator.class);
-//
-//    public GraphGenerator(int countOfVertices, int countOfEdges) {
-//        logger.trace("ENTRY");
-//        if (countOfVertices <= 0 || countOfEdges <= 0
-//                || countOfEdges > (countOfVertices * countOfVertices - countOfVertices)) {
-//            throw new InvalidParameterException("Count of edges is greater then count of possible edges.");
-//        }
-//        this.COUNT_OF_VERTICES = countOfVertices;
-//        this.COUNT_OF_EDGES = countOfEdges;
-//        this.graph = new GraphImpl();
-//        this.conectionGraph = new boolean[this.COUNT_OF_VERTICES][this.COUNT_OF_VERTICES];
-//        logger.trace("EXIT");
-//    }
-//
-//    /**
-//     * This method creates the vertices and adds them to the graph.
-//     */
-//    private void generateVertices() {
-//        logger.trace("ENTRY");
-//        VertexInterface vertex;
-//        String name;
-//
-//        for (int i = 0; i < this.COUNT_OF_VERTICES; i++) {
-//            name = "vertex " + (i + 1);
-//            vertex = new VertexImpl((i + 1), name, name);
-//            this.graph.addVertex(name, vertex);
-//        }
-//        logger.trace("EXIT");
-//    }
-//
-//    /**
-//     * Generates edges between randomly selected vertices and adds them to the
-//     * graph.
-//     */
-//    private void generateEdges() {
-//        logger.trace("ENTRY");
-//        Random rnd = new Random(10);
-//        int v1, v2;
-//        EdgeInterface edge;
-//        VertexImpl vertex1, vertex2;
-//        for (int i = 0; i < this.COUNT_OF_EDGES; i++) {
-//
-//            do {
-//                v1 = rnd.nextInt(this.COUNT_OF_VERTICES);
-//                v2 = rnd.nextInt(this.COUNT_OF_VERTICES);
-//            } while (v1 == v2 || this.conectionGraph[v1][v2] == true);
-//
-//            this.conectionGraph[v1][v2] = true;
-//
-//            vertex1 = (VertexImpl) this.graph.getVertices().get("vertex " + (v1 + 1));
-//            vertex2 = (VertexImpl) this.graph.getVertices().get("vertex " + (v2 + 1));
-//            edge = new EdgeImpl(i + 1, vertex1.getName(), vertex2.getName(), true, "");
-//            this.graph.addEdge(edge);
-////            vertex1.addEdge(edge);
-////            vertex2.addEdge(edge);
-//
-//        }
-//        logger.trace("EXIT");
-//    }
-//
-//    /**
-//     * Generates the graph with vertices and edges.
-//     *
-//     * @return graph
-//     */
-//    public GraphInterface generate() {
-//        logger.trace("ENTRY");
-//        generateVertices();
-//        generateEdges();
-//        logger.trace("EXIT");
-//        return this.graph;
-//    }
-//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphMaker.java b/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphMaker.java
deleted file mode 100644
index f8701e9..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/creator/GraphMaker.java
+++ /dev/null
@@ -1,439 +0,0 @@
-//package cz.zcu.kiv.offscreen.graph.creator;
-//
-//import cz.zcu.kiv.ccu.ApiCmpStateResult;
-//import cz.zcu.kiv.ccu.ApiInterCompatibilityResult;
-//import cz.zcu.kiv.jacc.cmp.JComparator;
-//import cz.zcu.kiv.jacc.javatypes.*;
-//import cz.zcu.kiv.offscreen.api.GraphInterface;
-//import cz.zcu.kiv.offscreen.api.VertexInterface;
-//import cz.zcu.kiv.offscreen.graph.EdgeImpl;
-//import cz.zcu.kiv.offscreen.graph.GraphImpl;
-//import cz.zcu.kiv.offscreen.graph.VertexImpl;
-//import cz.zcu.kiv.typescmp.CmpResult;
-//import cz.zcu.kiv.typescmp.CmpResultNode;
-//import cz.zcu.kiv.typescmp.CorrectionStrategy;
-//
-//import org.apache.log4j.Logger;
-//import org.json.JSONArray;
-//import org.json.JSONObject;
-//
-//import java.io.File;
-//import java.io.IOException;
-//import java.io.InputStream;
-//import java.util.*;
-//
-///**
-// * This class provides creation graph of the loaded bundle.
-// *
-// * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
-// */
-//public class GraphMaker {
-//
-//    private GraphInterface graph;
-//    private Logger logger = Logger.getLogger(GraphMaker.class);
-//    private Map<String, VertexInterface> vertexMap;
-//    private String fileLocation;
-//    private int level;
-//
-//    private ApiInterCompatibilityResult comparisonResult;
-//    private File[] uploadedFiles;
-//    private Properties jaccMessages;
-//
-//    private static final String NOT_FOUND = "NOT_FOUND";
-//
-//    public GraphMaker(String fileLocation, ApiInterCompatibilityResult comparisonResult, File[] uploadedFiles) throws IOException {
-//        logger.trace("ENTRY");
-//        this.graph = new GraphImpl();
-//        this.fileLocation = fileLocation;
-//
-//        this.uploadedFiles = uploadedFiles;
-//        this.comparisonResult = comparisonResult;
-//        logger.trace("EXIT");
-//
-//        jaccMessages = new Properties();
-//        InputStream in = null;
-//        try {
-//            in = JComparator.class.getResourceAsStream("messages.properties");
-//            jaccMessages.load(in);
-//        } catch (IOException e) {
-//            logger.trace(e);
-//        } finally {
-//            if (in != null) {
-//                try {
-//                    in.close();
-//                } catch (IOException e) {
-//                    logger.trace(e);
-//                }
-//            }
-//        }
-//    }
-//
-//    /**
-//     * This method creates the vertices and adds them to the graph.
-//     */
-//    private void generateVertices() {
-//        logger.trace("ENTRY");
-//
-//        VertexImpl vertex;
-//        String name;
-//        String symbolicName;
-//        int id = 0;
-//        this.vertexMap = new HashMap<>();
-//
-//        for (File origin : this.uploadedFiles) {
-//            id++;
-//            symbolicName = createSymbolicName(origin.toString());
-//            name = origin.getName();
-//            vertex = new VertexImpl(id, name, symbolicName);
-//
-//            this.vertexMap.put(symbolicName, vertex);
-//            this.graph.addVertex(symbolicName, vertex);
-//        }
-//
-//        symbolicName = createSymbolicName(NOT_FOUND);
-//        vertex = new VertexImpl(++id, NOT_FOUND, symbolicName);
-//
-//        this.vertexMap.put(symbolicName, vertex);
-//        this.graph.addVertex(symbolicName, vertex);
-//
-//        logger.trace("EXIT");
-//    }
-//
-//    /**
-//     * This method creates the edges and adds them to the graph. Currently, only incompatible edges are created.
-//     */
-//    private void generateEdges() {
-//        logger.trace("ENTRY");
-//
-//        int id = 0;
-//
-//        // cyklus pres nekompatibilni komponenty (komponenta = jar soubor)
-//        Set<String> components = comparisonResult.getOriginsImportingIncompatibilities();
-//        for (String component : components) {
-//            String firstOrigin = "";
-//            String secondOrigin = "";
-//            String firstOriginNF = "";
-//            String secondOriginNF = "";
-//
-//            JSONArray incompatibleInfoJSON = new JSONArray();
-//            JSONArray notFoundInfoJSON = new JSONArray();
-//
-//            // cyklus pres nekompatibilni tridy
-//            Set<JClass> incompatibleClasses = comparisonResult.getClassesImportingIncompatibilities(component);
-//            for (JClass incompatibleClass : incompatibleClasses) {
-//                JSONArray incompatibilitiesJson = new JSONArray();
-//                JSONArray missingClassesJson = new JSONArray();
-//
-//                // cyklus pres samotne nekompatibility
-//                Set<ApiCmpStateResult> apiCmpResults = comparisonResult.getIncompatibleResults(incompatibleClass, component);
-//                for (ApiCmpStateResult apiCmpResult : apiCmpResults) {
-//                    this.level = 0;
-//
-//                    CmpResult<File> cmpResult = apiCmpResult.getResult();
-//
-//                    if (cmpResult.getSecondObject() != null) {
-//                        List<CmpResultNode> children = cmpResult.getChildren();
-//                        for (CmpResultNode child : children) {
-//                            incompatibilitiesJson.put(findIncompatibilityCause(child, ""));
-//                        }
-//
-//                        if (firstOrigin.equals("") && secondOrigin.equals("")) {
-//                            firstOrigin = cmpResult.getFirstObject().getName();
-//                            secondOrigin = cmpResult.getSecondObject().getName();
-//                        }
-//
-//                    } else {
-//                        List<CmpResultNode> children = cmpResult.getChildren();
-//                        for (CmpResultNode child : children) {
-//                            missingClassesJson.put(findIncompatibilityCause(child, ""));
-//                        }
-//
-//                        if (firstOriginNF.equals("") && secondOriginNF.equals("")) {
-//                            firstOriginNF = cmpResult.getFirstObject().getName();
-//                            secondOriginNF = NOT_FOUND;
-//                        }
-//                    }
-//                }
-//
-//                // incompatible class
-//                JSONObject incompatibleClassJson = new JSONObject();
-//                incompatibleClassJson.put("causedBy", incompatibleClass.getName());
-//                incompatibleClassJson.put("incomps", incompatibilitiesJson);
-//
-//                incompatibleInfoJSON.put(incompatibleClassJson);
-//
-//                // not found class
-//                JSONObject notFoundClassJson = new JSONObject();
-//                notFoundClassJson.put("causedBy", incompatibleClass.getName());
-//                notFoundClassJson.put("incomps", missingClassesJson);
-//
-//                notFoundInfoJSON.put(notFoundClassJson);
-//            }
-//
-//            if (!firstOrigin.equals("")) {
-//                id++;
-//                EdgeImpl edge = new EdgeImpl(id, createSymbolicName(firstOrigin), createSymbolicName(secondOrigin), false, incompatibleInfoJSON.toString());
-//                this.graph.addEdge(edge);
-//            }
-//
-//            if (!firstOriginNF.equals("")) {
-//                id++;
-//                EdgeImpl edge = new EdgeImpl(id, createSymbolicName(secondOriginNF), createSymbolicName(firstOriginNF), false, notFoundInfoJSON.toString());
-//                this.graph.addEdge(edge);
-//            }
-//        }
-//
-//        logger.trace("EXIT");
-//    }
-//
-//    /**
-//     * Create symbolic name.
-//     *
-//     * @param origin
-//     * @return Symbolic name.
-//     */
-//    private String createSymbolicName(String origin) {
-//        String location = this.fileLocation.replace("/", File.separator) + File.separator;
-//
-//        return "vertex_" + origin.replace(location, "");
-//    }
-//
-//    /**
-//     * Generates the graph with vertices and edges.
-//     *
-//     * @return graph
-//     */
-//    public GraphInterface generate() {
-//        logger.trace("ENTRY");
-//
-//        this.generateVertices();
-//        this.generateEdges();
-//
-//        logger.trace("EXIT");
-//
-//        return this.graph;
-//    }
-//
-//    /**
-//     * Recursive function for traversing tree with incompatibility information. Creates object serializable to JSON.
-//     *
-//     * @param cmpResultNode
-//     * @param corrStrategy
-//     */
-//    public JSONObject findIncompatibilityCause(CmpResultNode cmpResultNode, String corrStrategy) {
-//        Object o = cmpResultNode.getResult().getFirstObject();
-//
-//        // cause description
-//        JSONObject descriptionJson = new JSONObject();
-//        descriptionJson.put("level", this.level);
-//
-//        if (o instanceof JMethod) {
-//            descriptionJson.put("name", "M " + getMethodDeclaration(o));
-//        } else if (o instanceof JField) {
-//            descriptionJson.put("name", "F " + getFieldDeclaration(o));
-//        } else if (o instanceof HasName) {
-//            descriptionJson.put("name", this.jaccMessages.getProperty(cmpResultNode.getContentCode()) + ": " + ((HasName) o).getName());
-//        } else {
-//            descriptionJson.put("name", this.jaccMessages.getProperty(cmpResultNode.getContentCode()));
-//        }
-//
-//        descriptionJson.put("contentCode", cmpResultNode.getContentCode());
-//        descriptionJson.put("propertyName", this.jaccMessages.getProperty(cmpResultNode.getContentCode()));
-//        descriptionJson.put("isIncompCause", cmpResultNode.isIncompatibilityCause());
-//
-//        if (o instanceof JPackage) {
-//            descriptionJson.put("type", "package");
-//            descriptionJson.put("details", getPackageDetails((JPackage) o));
-//        } else if (o instanceof JClass) {
-//            descriptionJson.put("type", "class");
-//            descriptionJson.put("details", getClassDetails((JClass) o));
-//        } else if (o instanceof JMethod) {
-//            descriptionJson.put("type", "method");
-//            descriptionJson.put("details", getMethodDetails((JMethod) o));
-//        } else if (o instanceof JField) {
-//            descriptionJson.put("type", "field");
-//            descriptionJson.put("details", getFieldDetails((JField) o));
-//        }
-//
-//        // incompatibility details
-//        if (cmpResultNode.isIncompatibilityCause()) {
-//            if (!cmpResultNode.getResult().getInherentDiff().name().equals("DEL")) {
-//                if (o instanceof HasName) {
-//                    descriptionJson.put("objectNameFirst", ((HasName) o).getName());
-//                    descriptionJson.put("objectNameSecond", ((HasName) cmpResultNode.getResult().getSecondObject()).getName());
-//                } else {
-//                    descriptionJson.put("objectNameFirst", o.toString());
-//                    descriptionJson.put("objectNameSecond", cmpResultNode.getResult().getSecondObject().toString());
-//                }
-//            }
-//
-//            String incompName = this.getIncompatibilityName(cmpResultNode, corrStrategy);
-//            if (incompName.equals("")) {
-//                descriptionJson.put("incompName", "Incompatible " + this.jaccMessages.getProperty(cmpResultNode.getContentCode()) + " -> " + corrStrategy); //child.getResult().getStrategy().name();
-//            } else {
-//                descriptionJson.put("incompName", incompName + (cmpResultNode.getResult().getInherentDiff().name().equals("DEL") ? " is missing -> " + cmpResultNode.getResult().getStrategy().name() : ""));
-//            }
-//
-//            descriptionJson.put("strategy", cmpResultNode.getResult().getStrategy().name());
-//            descriptionJson.put("difference", cmpResultNode.getResult().getInherentDiff().name());
-//        }
-//
-//        // subtree
-//        JSONArray subtreeJson = new JSONArray();
-//        if (!cmpResultNode.getResult().childrenCompatible()) {
-//            this.level++;
-//
-//            List<CmpResultNode> children = cmpResultNode.getResult().getChildren();
-//            for (CmpResultNode child : children) {
-//                CorrectionStrategy strategy = this.level == 1 ? cmpResultNode.getResult().getStrategy() : child.getResult().getStrategy();
-//
-//                subtreeJson.put(findIncompatibilityCause(child, strategy.name()));
-//            }
-//
-//            this.level--;
-//        }
-//
-//
-//        JSONObject causeJson = new JSONObject();
-//        causeJson.put("desc", descriptionJson);
-//        causeJson.put("subtree", subtreeJson);
-//
-//        return causeJson;
-//    }
-//
-//    private JSONObject getPackageDetails(JPackage pakkage) {
-//        JSONObject detailsJson = new JSONObject();
-//        detailsJson.put("name", pakkage.getName());
-//
-//        return detailsJson;
-//    }
-//
-//    private JSONObject getClassDetails(JClass clazz) {
-//        JSONObject detailsJson = new JSONObject();
-//
-//        detailsJson.put("name", clazz.getShortName());
-//        detailsJson.put("package", clazz.getPackage().getName());
-//
-//        detailsJson.put("enum", clazz.isEnum());
-//        detailsJson.put("interface", clazz.isInterface());
-//        detailsJson.put("annotation", clazz.isAnnotation());
-//
-//        detailsJson.put("abstract", clazz.getModifiers().isAbstract());
-//        detailsJson.put("final", clazz.getModifiers().isFinal());
-//        detailsJson.put("static", clazz.getModifiers().isStatic());
-//
-//        return detailsJson;
-//    }
-//
-//    private JSONObject getMethodDetails(JMethod method) {
-//        JSONObject detailsJson = new JSONObject();
-//
-//        detailsJson.put("name", method.getName());
-//        detailsJson.put("returnType", method.getReturnType().getName());
-//        detailsJson.put("constructor", method.isConstructor());
-//
-//        List<JType> exceptionTypes = method.getExceptionTypes();
-//        JSONArray exceptionTypeNames = new JSONArray();
-//        for (JType type : exceptionTypes) {
-//            exceptionTypeNames.put(type.getName());
-//        }
-//        detailsJson.put("exceptions", exceptionTypeNames);
-//
-//        List<JType> parameterTypes = method.getParameterTypes();
-//        JSONArray parameterTypeNames = new JSONArray();
-//        for (JType type : parameterTypes) {
-//            parameterTypeNames.put(type.getName());
-//        }
-//        detailsJson.put("paramTypes", parameterTypeNames);
-//
-//        detailsJson.put("abstract", method.getModifiers().isAbstract());
-//        detailsJson.put("final", method.getModifiers().isFinal());
-//        detailsJson.put("static", method.getModifiers().isStatic());
-//        detailsJson.put("synchronized", method.getModifiers().isSynchronized());
-//
-//        return detailsJson;
-//    }
-//
-//    private JSONObject getFieldDetails(JField field) {
-//        JSONObject detailsJson = new JSONObject();
-//
-//        detailsJson.put("name", field.getName());
-//        detailsJson.put("type", field.getType().getName());
-//        detailsJson.put("initialValue", field.getInitialValue());
-//
-//        detailsJson.put("abstract", field.getModifiers().isAbstract());
-//        detailsJson.put("final", field.getModifiers().isFinal());
-//        detailsJson.put("static", field.getModifiers().isStatic());
-//
-//        return detailsJson;
-//    }
-//
-//    private String getShortName(String longName) {
-//        return longName.substring(longName.lastIndexOf('.') + 1);
-//    }
-//
-//    private String getMethodDeclaration(Object o) {
-//        String methodName = "";
-//        methodName += getShortName(((JMethod) o).getReturnType().getName());
-//        methodName += " " + ((JMethod) o).getName();
-//        methodName += "(";
-//        for (JType type : ((JMethod) o).getParameterTypes()) {
-//            methodName += getShortName(type.getName()) + ", ";
-//        }
-//        methodName = methodName.replaceAll(", $", "");
-//        methodName += ")";
-//        return methodName;
-//    }
-//
-//    private String getFieldDeclaration(Object o) {
-//        String fieldDeclaration = "";
-//        fieldDeclaration += getShortName(((JField) o).getType().getName());
-//        fieldDeclaration += " " + ((JField) o).getName();
-//        return fieldDeclaration;
-//    }
-//
-//    private String getIncompatibilityName(CmpResultNode child, String corrStrategy) {
-//        Object o = child.getResult().getFirstObject();
-//
-//        String incompName;
-//        switch (child.getContentCode()) {
-//            case "cmp.child.class":
-//                if (o instanceof HasName) {
-//                    incompName = "Class " + ((HasName) o).getName();
-//                } else {
-//                    incompName = "Class " + o.toString();
-//                }
-//                break;
-//            case "cmp.child.method.return.type":
-//                incompName = this.jaccMessages.getProperty(child.getContentCode()) + " different -> " + corrStrategy;
-//                break;
-//            case "cmp.child.method.param.type":
-//                if (o instanceof HasName) {
-//                    incompName = "Parameter " + getShortName(((HasName) o).getName()) + " different -> " + corrStrategy;
-//                } else {
-//                    incompName = "Parameter " + getShortName(o.toString()) + " different -> " + corrStrategy;
-//                }
-//                break;
-//            case "cmp.child.method.invocation":
-//                incompName = "Invoke Virtual" + " -> " + child.getResult().getStrategy().name();
-//                break;
-//            case "cmp.child.method":
-//                incompName = "<span class='entity'>M</span> " + getMethodDeclaration(o);
-//                break;
-//            case "cmp.child.constructor":
-//                incompName = "<span class='entity'>C</span> " + getMethodDeclaration(o);
-//                break;
-//            case "cmp.child.field":
-//                incompName = "<span class='entity'>F</span> " + getFieldDeclaration(o);
-//                break;
-//            case "cmp.child.modifier":
-//                incompName = "<span class='entity'>P</span> " + o.toString() + " -> " + corrStrategy;
-//                break;
-//            default:
-//                incompName = "";
-//                break;
-//        }
-//        return incompName;
-//    }
-//
-//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpComparison.java b/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpComparison.java
deleted file mode 100644
index ac0b58c..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpComparison.java
+++ /dev/null
@@ -1,88 +0,0 @@
-//package cz.zcu.kiv.offscreen.graph.efp;
-//
-//import org.apache.log4j.Logger;
-//
-///**
-// *
-// * Holds data of EFP comparison relation.
-// *
-// * @author Jiri Loudil
-// *
-// */
-//public class EfpComparison {
-//
-//	/**
-//	 * Status of the EFP cmp. OK, MISSING, etc.
-//	 */
-//	private String comparisonStatus;
-//
-//	/**
-//	 * Name of the EFP cmp.
-//	 */
-//	private String efpName;
-//
-//	/**
-//	 * Values of the left and right side of cmp. relation.
-//	 */
-//	private String leftEfpValue, rightEfpValue;
-//
-//	/**
-//	 * Name of the type used for the EFP cmp. relation.
-//	 */
-//	private String typeName;
-//
-//	/**
-//	 * Logging.
-//	 */
-//	private Logger logger = Logger.getLogger(EfpComparison.class);
-//
-//	/**
-//	 * Construct new relation.
-//	 */
-//	public EfpComparison() {
-//		logger.trace("ENTRY");
-//
-//		logger.trace("EXIT");
-//	}
-//
-//	public String getComparisonStatus() {
-//		return comparisonStatus;
-//	}
-//
-//	public void setComparisonStatus(String comparisonStatus) {
-//		this.comparisonStatus = comparisonStatus;
-//	}
-//
-//	public String getTypeName() {
-//		return typeName;
-//	}
-//
-//	public void setTypeName(String typeName) {
-//		this.typeName = typeName;
-//	}
-//
-//	public String getLeftEfpValue() {
-//		return leftEfpValue;
-//	}
-//
-//	public void setLeftEfpValue(String leftEfpValue) {
-//		this.leftEfpValue = leftEfpValue;
-//	}
-//
-//	public String getRightEfpValue() {
-//		return rightEfpValue;
-//	}
-//
-//	public void setRightEfpValue(String rightEfpValue) {
-//		this.rightEfpValue = rightEfpValue;
-//	}
-//
-//	public String getEfpName() {
-//		return efpName;
-//	}
-//
-//	public void setEfpName(String efpName) {
-//		this.efpName = efpName;
-//	}
-//
-//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpFeature.java b/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpFeature.java
deleted file mode 100644
index 0af9b5b..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpFeature.java
+++ /dev/null
@@ -1,72 +0,0 @@
-//package cz.zcu.kiv.offscreen.graph.efp;
-//
-//import java.util.ArrayList;
-//
-//import org.apache.log4j.Logger;
-//
-///**
-// *
-// * Holds data of a feature used in EFP relation.
-// *
-// * @author Jiri Loudil
-// *
-// */
-//public class EfpFeature {
-//
-//	/**
-//	 * Name of the feature.
-//	 */
-//	private String name = "";
-//
-//	/**
-//	 * List of EFPs connected to this particular feature.
-//	 */
-//	private ArrayList<EfpComparison> efps;
-//
-//	/**
-//	 * Status of the feture. OK, MISSING, etc.
-//	 */
-//	private String featureStatus = "";
-//
-//	/**
-//	 * Logging.
-//	 */
-//	private Logger logger = Logger.getLogger(EfpFeature.class);
-//
-//	/**
-//	 *
-//	 * Construct new named feature.
-//	 *
-//	 * @param name New feature name.
-//	 */
-//	public EfpFeature(String name) {
-//		logger.trace("ENTRY");
-//		this.name = name;
-//
-//		this.efps = new ArrayList<EfpComparison>();
-//		this.featureStatus = "";
-//
-//		logger.trace("EXIT");
-//	}
-//
-//	public ArrayList<EfpComparison> getEfps() {
-//		return efps;
-//	}
-//
-//	public String getFeatureStatus() {
-//		return featureStatus;
-//	}
-//
-//	public void setFeatureStatus(String featureStatus) {
-//		this.featureStatus = featureStatus;
-//	}
-//
-//	public String getName() {
-//		return name;
-//	}
-//
-//	public void setName(String name) {
-//		this.name = name;
-//	}
-//
-//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpGraphicSettings.java b/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpGraphicSettings.java
deleted file mode 100644
index 4781896..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/efp/EfpGraphicSettings.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.efp;
-
-/**
- * 
- * @author Jiri Loudil
- *
- */
-public class EfpGraphicSettings {
-	private int minInterfaceDiameter, maxInterfaceDiameter;
-
-	public EfpGraphicSettings() {
-		
-	}
-
-	public int getMinInterfaceDiameter() {
-		return minInterfaceDiameter;
-	}
-
-	public void setMinInterfaceDiameter(int minInterfaceDiameter) {
-		this.minInterfaceDiameter = minInterfaceDiameter;
-	}
-
-	public int getMaxInterfaceDiameter() {
-		return maxInterfaceDiameter;
-	}
-
-	public void setMaxInterfaceDiameter(int maxInterfaceDiameter) {
-		this.maxInterfaceDiameter = maxInterfaceDiameter;
-	}
-
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/filter/AttributeFilter.java b/sources/src/cz/zcu/kiv/offscreen/graph/filter/AttributeFilter.java
deleted file mode 100644
index 7dcda7b..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/filter/AttributeFilter.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.filter;
-
-import java.util.HashMap;
-
-public class AttributeFilter {
-    private HashMap<Integer, NumberAttributeFilter> numberFilters = new HashMap<Integer, NumberAttributeFilter>();
-    private HashMap<Integer, EnumAttributeFilter> enumFilters = new HashMap<Integer, EnumAttributeFilter>();
-    private HashMap<Integer, DateAttributeFilter> dateFilters = new HashMap<Integer, DateAttributeFilter>();
-    private HashMap<Integer, StringAttributeFilter> stringFilters = new HashMap<Integer, StringAttributeFilter>();
-
-
-    public void addNumberFilter(int attrTypeIndex, NumberAttributeFilter filter) {
-        numberFilters.put(attrTypeIndex, filter);
-    }
-
-    public NumberAttributeFilter getNumberFilter(int attrTypeIndex) {
-        return numberFilters.get(attrTypeIndex);
-    }
-
-    public void addEnumFilter(int attrTypeIndex, EnumAttributeFilter filter) {
-        enumFilters.put(attrTypeIndex, filter);
-    }
-
-    public EnumAttributeFilter getEnumFilter(int attrTypeIndex) {
-        return enumFilters.get(attrTypeIndex);
-    }
-
-    public void addDateFilter(int attrTypeIndex, DateAttributeFilter filter) {
-        dateFilters.put(attrTypeIndex, filter);
-    }
-
-    public DateAttributeFilter getDateFilter(int attrTypeIndex) {
-        return dateFilters.get(attrTypeIndex);
-    }
-
-    public void addStringFilter(int attrTypeIndex, StringAttributeFilter filter) {
-        stringFilters.put(attrTypeIndex, filter);
-    }
-
-    public StringAttributeFilter getStringFilter(int attrTypeIndex) {
-        return stringFilters.get(attrTypeIndex);
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/filter/DateAttributeFilter.java b/sources/src/cz/zcu/kiv/offscreen/graph/filter/DateAttributeFilter.java
deleted file mode 100644
index 5296555..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/filter/DateAttributeFilter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.filter;
-
-import java.util.Date;
-
-public class DateAttributeFilter implements ITypeAttributeFilter {
-    private Date min;
-    private Date max;
-    private boolean minInclusive;
-    private boolean maxInclusive;
-    private GraphFilter.DateMatchType matchType;
-
-    public DateAttributeFilter(Date min, Date max, boolean minInclusive, boolean maxInclusive, GraphFilter.DateMatchType matchType) {
-        this.min = min;
-        this.max = max;
-        this.minInclusive = minInclusive;
-        this.maxInclusive = maxInclusive;
-        this.matchType = matchType;
-    }
-
-    @Override
-    public boolean filter(Object value) {
-        Date date = (Date) value;
-        boolean result = false;
-
-        int cmpMin = -1;
-        int cmpMax = 1;
-
-        if (minInclusive) cmpMin = 0;
-        if (maxInclusive) cmpMax = 0;
-
-        if (min.compareTo(date) <= cmpMin && max.compareTo(date) >= cmpMax) {
-            result = true;
-        }
-
-        return (matchType == GraphFilter.DateMatchType.MATCHING) == result;
-    }
-
-    public Date getMin() {
-        return min;
-    }
-
-    public Date getMax() {
-        return max;
-    }
-
-    public boolean isMinInclusive() {
-        return minInclusive;
-    }
-
-    public boolean isMaxInclusive() {
-        return maxInclusive;
-    }
-
-    public GraphFilter.DateMatchType getMatchType() {
-        return matchType;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/filter/EdgeArchetypeFilter.java b/sources/src/cz/zcu/kiv/offscreen/graph/filter/EdgeArchetypeFilter.java
deleted file mode 100644
index cb5bcdf..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/filter/EdgeArchetypeFilter.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.filter;
-
-import cz.zcu.kiv.offscreen.graph.EdgeArchetypeInfo;
-
-import java.util.List;
-
-public class EdgeArchetypeFilter {
-    public List<EdgeArchetypeInfo> archetypeIndeces;
-    public GraphFilter.ArchetypeMatchType matchType;
-
-    public EdgeArchetypeFilter(List<EdgeArchetypeInfo> archetypeIndeces, GraphFilter.ArchetypeMatchType matchType) {
-        this.archetypeIndeces = archetypeIndeces;
-        this.matchType = matchType;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/filter/EnumAttributeFilter.java b/sources/src/cz/zcu/kiv/offscreen/graph/filter/EnumAttributeFilter.java
deleted file mode 100644
index 1233ef7..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/filter/EnumAttributeFilter.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.filter;
-
-import java.util.List;
-
-public class EnumAttributeFilter implements ITypeAttributeFilter {
-    private List<Integer> valueIndices;
-    private GraphFilter.EnumMatchType matchType;
-
-    public EnumAttributeFilter(List<Integer> valueIndices, GraphFilter.EnumMatchType matchType) {
-        this.valueIndices = valueIndices;
-        this.matchType = matchType;
-    }
-
-    @Override
-    public boolean filter(Object value) {
-        boolean result = true;
-        List<Integer> val = (List<Integer>) value;
-
-        switch (matchType) {
-            case ANY:
-                for (int e : val) {
-                    if (valueIndices.contains(e)) {
-                        return true;
-                    }
-                }
-                result = false;
-                break;
-            case NONE:
-                for (int e : val) {
-                    if (valueIndices.contains(e)) {
-                        return false;
-                    }
-                }
-                result = true;
-                break;
-            case EXACT_MATCH:
-                for (int e : val) {
-                    if (!valueIndices.contains(e)) {
-                        return false;
-                    }
-                }
-                for (int e : valueIndices) {
-                    if (!val.contains(e)) {
-                        return false;
-                    }
-                }
-                result = true;
-                break;
-        }
-
-        return result;
-    }
-
-    public List<Integer> getValueIndices() {
-        return valueIndices;
-    }
-
-    public GraphFilter.EnumMatchType getMatchType() {
-        return matchType;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/filter/GraphFilter.java b/sources/src/cz/zcu/kiv/offscreen/graph/filter/GraphFilter.java
deleted file mode 100644
index ce36932..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/filter/GraphFilter.java
+++ /dev/null
@@ -1,226 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.filter;
-
-import cz.zcu.kiv.offscreen.graph.EdgeArchetypeInfo;
-
-import java.math.BigDecimal;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-
-public class GraphFilter {
-    public enum ArchetypeMatchType {
-        /**
-         * accepts all the archetypes in the list
-         */
-        MATCHING,
-
-        /**
-         * accepts all the available archetypes except those in the list
-         */
-        NON_MATCHING
-    }
-
-    public enum NumberMatchType {
-        /**
-         * accepts all numbers that belong to the interval
-         */
-        MATCHING,
-
-        /**
-         * accepts all numbers that are outside the interval
-         */
-        NON_MATCHING
-    }
-
-    public enum EnumMatchType {
-        /**
-         * accepts when the attribute has at least one of the values in the list
-         */
-        ANY,
-
-        /**
-         * accepts when the attribute has none of the values in the list
-         */
-        NONE,
-
-        /**
-         * accepts when the attribute has the exact values as the values in the list and none other
-         */
-        EXACT_MATCH
-    }
-
-    public enum DateMatchType {
-        /**
-         * accepts all dates that belong to the interval
-         */
-        MATCHING,
-
-        /**
-         * accepts all dates that are outside the interval
-         */
-        NON_MATCHING
-    }
-
-    public enum StringMatchType {
-        /**
-         * accepts strings that have the exact filter value
-         */
-        EXACT_MATCH,
-
-        /**
-         * accepts strings that have any value different from the filter value
-         */
-        EXACT_MISMATCH,
-
-        /**
-         * accepts strings that contain the filter value as a substring
-         */
-        CONTAINING,
-
-        /**
-         * accepts strings that do not contain the filter value as s substring
-         */
-        NON_CONTAINING,
-
-        /**
-         * accepts strings that are accepted by the regular expression defined by the filter value
-         */
-        REGULAR_EXPRESSION
-    }
-
-    private VertexArchetypeFilter vertexArchetypeFilter;
-    private EdgeArchetypeFilter edgeArchetypeFilter;
-
-    /**
-     * key is the vertex archetype index, value is the filter object
-     */
-    private HashMap<Integer, AttributeFilter> vertexAttributeFilters = new HashMap<>();
-
-    /**
-     * key is the edge archetype index, value is the filter object
-     */
-    private HashMap<Integer, AttributeFilter> edgeAttributeFilters = new HashMap<Integer, AttributeFilter>();
-
-    public AttributeFilter getVertexAttributeFilter(int archetypeIndex) {
-        return vertexAttributeFilters.get(archetypeIndex);
-    }
-
-    public AttributeFilter getEdgeAttributeFilter(int archetypeIndex) {
-        return edgeAttributeFilters.get(archetypeIndex);
-    }
-
-    public VertexArchetypeFilter getVertexArchetypeFilter() {
-        return vertexArchetypeFilter;
-    }
-
-    public EdgeArchetypeFilter getEdgeArchetypeFilter() {
-        return edgeArchetypeFilter;
-    }
-
-    public void setVertexArchetypeFilter(List<Integer> archetypeIndices, ArchetypeMatchType matchType) {
-        vertexArchetypeFilter = new VertexArchetypeFilter(archetypeIndices, matchType);
-    }
-
-    public void setEdgeArchetypeFilter(List<EdgeArchetypeInfo> archetypeIndices, ArchetypeMatchType matchType) {
-        edgeArchetypeFilter = new EdgeArchetypeFilter(archetypeIndices, matchType);
-    }
-
-    public void setVertexNumberAttributeFilter(int archetypeIndex, int attributeTypeIndex, BigDecimal min, BigDecimal max, boolean minInclusive, boolean maxInclusive, NumberMatchType matchType) {
-        AttributeFilter filter;
-        if (vertexAttributeFilters.containsKey(archetypeIndex)) {
-            filter = vertexAttributeFilters.get(archetypeIndex);
-        } else {
-            filter = new AttributeFilter();
-            vertexAttributeFilters.put(archetypeIndex, filter);
-        }
-        filter.addNumberFilter(attributeTypeIndex, new NumberAttributeFilter(min, max, minInclusive, maxInclusive, matchType));
-    }
-
-    public void setEdgeNumberAttributeFilter(int archetypeIndex, int attributeTypeIndex, BigDecimal min, BigDecimal max, boolean minInclusive, boolean maxInclusive, NumberMatchType matchType) {
-        AttributeFilter filter;
-        if (edgeAttributeFilters.containsKey(archetypeIndex)) {
-            filter = edgeAttributeFilters.get(archetypeIndex);
-        } else {
-            filter = new AttributeFilter();
-            edgeAttributeFilters.put(archetypeIndex, filter);
-        }
-        filter.addNumberFilter(attributeTypeIndex, new NumberAttributeFilter(min, max, minInclusive, maxInclusive, matchType));
-    }
-
-    public void setVertexEnumAttributeFilter(int archetypeIndex, int attributeTypeIndex, List<Integer> valueIndices, EnumMatchType matchType) {
-        AttributeFilter filter;
-        if (vertexAttributeFilters.containsKey(archetypeIndex)) {
-            filter = vertexAttributeFilters.get(archetypeIndex);
-        } else {
-            filter = new AttributeFilter();
-            vertexAttributeFilters.put(archetypeIndex, filter);
-        }
-        filter.addEnumFilter(attributeTypeIndex, new EnumAttributeFilter(valueIndices, matchType));
-    }
-
-    public void setEdgeEnumAttributeFilter(int archetypeIndex, int attributeTypeIndex, List<Integer> valueIndices, EnumMatchType matchType) {
-        AttributeFilter filter;
-        if (edgeAttributeFilters.containsKey(archetypeIndex)) {
-            filter = edgeAttributeFilters.get(archetypeIndex);
-        } else {
-            filter = new AttributeFilter();
-            edgeAttributeFilters.put(archetypeIndex, filter);
-        }
-        filter.addEnumFilter(attributeTypeIndex, new EnumAttributeFilter(valueIndices, matchType));
-    }
-
-    public void setVertexDateAttributeFilter(int archetypeIndex, int attributeTypeIndex, Date min, Date max, boolean minInclusive, boolean maxInclusive, DateMatchType matchType) {
-        AttributeFilter filter;
-        if (vertexAttributeFilters.containsKey(archetypeIndex)) {
-            filter = vertexAttributeFilters.get(archetypeIndex);
-        } else {
-            filter = new AttributeFilter();
-            vertexAttributeFilters.put(archetypeIndex, filter);
-        }
-        filter.addDateFilter(attributeTypeIndex, new DateAttributeFilter(min, max, minInclusive, maxInclusive, matchType));
-    }
-
-    public void setEdgeDateAttributeFilter(int archetypeIndex, int attributeTypeIndex, Date min, Date max, boolean minInclusive, boolean maxInclusive, DateMatchType matchType) {
-        AttributeFilter filter;
-        if (edgeAttributeFilters.containsKey(archetypeIndex)) {
-            filter = edgeAttributeFilters.get(archetypeIndex);
-        } else {
-            filter = new AttributeFilter();
-            edgeAttributeFilters.put(archetypeIndex, filter);
-        }
-        filter.addDateFilter(attributeTypeIndex, new DateAttributeFilter(min, max, minInclusive, maxInclusive, matchType));
-    }
-
-    public void setVertexStringAttributeFilter(int archetypeIndex, int attributeTypeIndex, String filterValue, StringMatchType matchType) {
-        AttributeFilter filter;
-        if (vertexAttributeFilters.containsKey(archetypeIndex)) {
-            filter = vertexAttributeFilters.get(archetypeIndex);
-        } else {
-            filter = new AttributeFilter();
-            vertexAttributeFilters.put(archetypeIndex, filter);
-        }
-        filter.addStringFilter(attributeTypeIndex, new StringAttributeFilter(filterValue, matchType));
-    }
-
-    public void setEdgeStringAttributeFilter(int archetypeIndex, int attributeTypeIndex, String filterValue, StringMatchType matchType) {
-        AttributeFilter filter;
-        if (edgeAttributeFilters.containsKey(archetypeIndex)) {
-            filter = edgeAttributeFilters.get(archetypeIndex);
-        } else {
-            filter = new AttributeFilter();
-            edgeAttributeFilters.put(archetypeIndex, filter);
-        }
-        filter.addStringFilter(attributeTypeIndex, new StringAttributeFilter(filterValue, matchType));
-    }
-
-    /*
-    advised filtering process:
-    first filter the archetypes using queries in the hash maps in GraphManager
-    then iterate through all vertices/edges that are left after the first step and for each vertex/edge do the following:
-     - use getVertex/EdgeAttributeFilter in GraphFilter to get the filer setting for the given archetype, this returns AttributeFilter
-     - iterate through all attributes of the vertex/edge and do the following:
-        - get the attribute data type and index
-        - use getString/Number/Enum/DateFilter in AttributeFilter to get the filter for the given attribute
-        - decide whether the attribute's value passes the filter and whether to keep the give vertex/edge or not
-     */
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/filter/ITypeAttributeFilter.java b/sources/src/cz/zcu/kiv/offscreen/graph/filter/ITypeAttributeFilter.java
deleted file mode 100644
index e28194f..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/filter/ITypeAttributeFilter.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.filter;
-
-public interface ITypeAttributeFilter {
-    boolean filter(Object value);
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/filter/NumberAttributeFilter.java b/sources/src/cz/zcu/kiv/offscreen/graph/filter/NumberAttributeFilter.java
deleted file mode 100644
index 3b67d2c..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/filter/NumberAttributeFilter.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.filter;
-
-import java.math.BigDecimal;
-
-public class NumberAttributeFilter implements ITypeAttributeFilter {
-    private BigDecimal min;
-    private BigDecimal max;
-    private boolean minInclusive;
-    private boolean maxInclusive;
-    private GraphFilter.NumberMatchType matchType;
-
-    public NumberAttributeFilter(BigDecimal min, BigDecimal max, boolean minInclusive, boolean maxInclusive, GraphFilter.NumberMatchType matchType) {
-        this.min = min;
-        this.max = max;
-        this.minInclusive = minInclusive;
-        this.maxInclusive = maxInclusive;
-        this.matchType = matchType;
-    }
-
-    @Override
-    public boolean filter(Object value) {
-        BigDecimal val = (BigDecimal) value;
-        boolean result = false;
-
-        int cmpMin = -1;
-        int cmpMax = 1;
-
-        if (minInclusive) cmpMin = 0;
-        if (maxInclusive) cmpMax = 0;
-
-        if (min.compareTo(val) <= cmpMin && max.compareTo(val) >= cmpMax) {
-            result = true;
-        }
-
-        return (matchType == GraphFilter.NumberMatchType.MATCHING) == result;
-    }
-
-    public BigDecimal getMin() {
-        return min;
-    }
-
-    public BigDecimal getMax() {
-        return max;
-    }
-
-    public boolean isMinInclusive() {
-        return minInclusive;
-    }
-
-    public boolean isMaxInclusive() {
-        return maxInclusive;
-    }
-
-    public GraphFilter.NumberMatchType getMatchType() {
-        return matchType;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/filter/StringAttributeFilter.java b/sources/src/cz/zcu/kiv/offscreen/graph/filter/StringAttributeFilter.java
deleted file mode 100644
index 1280fd7..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/filter/StringAttributeFilter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.filter;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class StringAttributeFilter implements ITypeAttributeFilter {
-    private String filterValue;
-    private GraphFilter.StringMatchType matchType;
-
-    public StringAttributeFilter(String filterValue, GraphFilter.StringMatchType matchType) {
-        this.filterValue = filterValue;
-        this.matchType = matchType;
-    }
-
-    @Override
-    public boolean filter(Object value) {
-        String val = (String) value;
-        boolean result = false;
-
-        switch (matchType) {
-            case EXACT_MATCH:
-                if (val.equals(filterValue)) result = true;
-                break;
-            case EXACT_MISMATCH:
-                if (!val.equals(filterValue)) result = true;
-                break;
-            case CONTAINING:
-                if (val.contains(filterValue)) result = true;
-                break;
-            case NON_CONTAINING:
-                if (!val.contains(filterValue)) result = true;
-                break;
-            case REGULAR_EXPRESSION:
-                Pattern pattern = Pattern.compile(filterValue);
-                Matcher matcher = pattern.matcher(val);
-                if (matcher.find()) result = true;
-                break;
-        }
-
-        return result;
-    }
-
-    public String getFilterValue() {
-        return filterValue;
-    }
-
-    public GraphFilter.StringMatchType getMatchType() {
-        return matchType;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/filter/VertexArchetypeFilter.java b/sources/src/cz/zcu/kiv/offscreen/graph/filter/VertexArchetypeFilter.java
deleted file mode 100644
index 21f19ca..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/filter/VertexArchetypeFilter.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.filter;
-
-import java.util.List;
-
-public class VertexArchetypeFilter {
-    public List<Integer> archetypeIndeces;
-    public GraphFilter.ArchetypeMatchType matchType;
-
-    public VertexArchetypeFilter(List<Integer> archetypeIndeces, GraphFilter.ArchetypeMatchType matchType) {
-        this.archetypeIndeces = archetypeIndeces;
-        this.matchType = matchType;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/loader/DemoDiagramLoader.java b/sources/src/cz/zcu/kiv/offscreen/graph/loader/DemoDiagramLoader.java
deleted file mode 100644
index 654158e..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/loader/DemoDiagramLoader.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.loader;
-
-import java.io.BufferedReader;
-import java.io.Closeable;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.apache.log4j.Logger;
-
-import cz.zcu.kiv.offscreen.servlets.LoadGraphData;
-
-public class DemoDiagramLoader {
-
-	private Logger logger = Logger.getLogger(LoadGraphData.class);
-
-	/**
-	 * 
-	 * Reads an input file specified by request.
-	 * 
-	 * @param in
-	 *            Input stream with JSON data.
-	 * @return JSON string
-	 */
-	public String readDemoJSONFromFile(InputStream in) {
-
-		BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
-		StringBuffer buffer = new StringBuffer();
-		String line = null;
-
-		try {
-			while ((line = reader.readLine()) != null) {
-				buffer.append(line);
-			}
-
-		} catch (Exception e) {
-			logger.error("ERROR at file reading");
-		} finally {
-			closeQuietly(in);
-			closeQuietly(reader);
-		}
-
-		return buffer.toString();
-	}
-
-	/**
-	 * 
-	 * Closes quietly a stream.
-	 * 
-	 * @param stream
-	 *            Input stream to close.
-	 */
-	private void closeQuietly(Closeable stream) {
-		if (stream != null)
-			try {
-				stream.close();
-			} catch (Exception e) {
-				// ignore
-			}
-	}
-
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/loader/GenericComponentLoader.java b/sources/src/cz/zcu/kiv/offscreen/graph/loader/GenericComponentLoader.java
deleted file mode 100644
index 68434e6..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/loader/GenericComponentLoader.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.loader;
-
-import cz.zcu.kiv.comav.core.export.loaders.ComponentLoader;
-import cz.zcu.kiv.comav.core.export.utils.ComAVException;
-import cz.zcu.kiv.comav.loaders.ejb3.Ejb3ComponentLoader;
-import cz.zcu.kiv.comav.loaders.osgi.OSGiComponentLoader;
-import java.io.IOException;
-import java.net.URI;
-import org.apache.log4j.Logger;
-
-/**
- *
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class GenericComponentLoader extends ComponentLoader {
-    
-    public static final String OSGI = "osgi";
-    public static final String SOFA2 = "sofa2";
-    public static final String EJB3 = "ejb3";
-    
-    private ComponentLoader loader;
-    
-    private Logger logger = Logger.getLogger(GenericComponentLoader.class);
-    
-    public GenericComponentLoader(String framework) {
-        logger.trace("ENTRY");
-        setComponentLoader(framework);
-        logger.trace("EXIT");
-    }
-    
-    private void setComponentLoader(String framework){
-        logger.trace("ENTRY");
-        if(OSGI.equalsIgnoreCase(framework)){
-            this.loader = new OSGiComponentLoader();
-        } else if (EJB3.equalsIgnoreCase(framework)){
-            this.loader = new Ejb3ComponentLoader();
-        } else if(SOFA2.equalsIgnoreCase(framework)){
-           // this.loader = new Sofa2LocalComponentLoader();
-        } else {
-            logger.error("Unsupported framework " + framework);
-            throw new IllegalStateException("Unsupported framework " + framework);
-        }
-        
-        logger.trace("EXIT");
-    }
-    
-    @Override
-    public void load(URI[] uris) throws IOException {
-        logger.trace("ENTRY");
-        
-        try {
-            loader.load(uris);
-        } catch (IOException e) {
-            try {
-                throw new ComAVException("Could not load data.", e);
-            } catch (ComAVException ex) {
-                System.out.println("ComAVException");
-                //Logger.getLogger(MyLoader.class.getName()).log(Level.SEVERE, null, ex);
-            }
-        }
-
-        model = loader.getModel();
-        componentList = loader.getComponents();
-        logger.trace("EXIT");
-    }
-    
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/loader/GraphJSONDataLoader.java b/sources/src/cz/zcu/kiv/offscreen/graph/loader/GraphJSONDataLoader.java
deleted file mode 100644
index ae7b5d9..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/loader/GraphJSONDataLoader.java
+++ /dev/null
@@ -1,223 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.loader;
-
-import cz.zcu.kiv.offscreen.graph.Attribute;
-import cz.zcu.kiv.offscreen.graph.EdgeArchetypeInfo;
-import cz.zcu.kiv.offscreen.graph.GraphManager;
-import net.sf.json.JSONArray;
-import net.sf.json.JSONObject;
-import org.apache.commons.io.FileUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.text.ParsePosition;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Class loads json file with graph data.
- * @author Stepan Baratta
- */
-public class GraphJSONDataLoader {
-
-    private File file;
-    private String loadedJSON;
-
-    private GraphManager graphManager;
-
-    /**
-     * stores archetypes of vertices, key is the vertex id, value is the index of its archetype
-     */
-    private HashMap<Integer, Integer> vertexArchetypes = new HashMap<Integer, Integer>();
-
-    static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
-
-    public GraphJSONDataLoader(File file) {
-        this.file = file;
-    }
-
-    private void loadJSON() throws IOException {
-        loadedJSON = FileUtils.readFileToString(file, "UTF-8");
-    }
-
-    public GraphManager LoadData() throws IOException {
-        this.graphManager = new GraphManager();
-
-        loadJSON();
-        JSONObject json = JSONObject.fromObject(loadedJSON);
-
-        JSONArray attributeTypes = getLoadedAttributeTypes(json);
-
-        loadVertexArchetypes(json);
-
-        loadEdgeArchetypes(json);
-
-        loadVertices(attributeTypes, json);
-
-        loadEdges(attributeTypes, json);
-
-        return graphManager;
-    }
-
-    /**
-     * Returns the json array with the loaded attribute types.
-     * Adds the attributes to the list of all attribute types.
-     * @param json
-     * @return - Json array with the attribute types.
-     */
-    private JSONArray getLoadedAttributeTypes(JSONObject json) {
-        JSONArray attributeTypes = json.getJSONArray("attributeTypes");
-        for (int i = 0; i < attributeTypes.size(); i++) {
-            JSONObject attributeType = attributeTypes.getJSONObject(i);
-            String dataTypeString = attributeType.getString("dataType");
-            GraphManager.AttributeDataType dataType;
-            switch (dataTypeString) {
-                case "number": dataType = GraphManager.AttributeDataType.NUMBER; break;
-                case "date": dataType = GraphManager.AttributeDataType.DATE; break;
-                case "enum": dataType = GraphManager.AttributeDataType.ENUM; break;
-                default: dataType = GraphManager.AttributeDataType.STRING; break;
-            }
-            graphManager.addAttributeType(attributeType.getString("name"), dataType, attributeType.getString("text"));
-        }
-
-        return attributeTypes;
-    }
-
-    /**
-     * Loads the vertex archetypes from the json and adds them to all vertex archetypes.
-     * @param json
-     */
-    private void loadVertexArchetypes(JSONObject json) {
-        JSONArray vertexArchetypes = json.getJSONArray("vertexArchetypes");
-        for (int i = 0; i < vertexArchetypes.size(); i++) {
-            JSONObject vertexArchetype = vertexArchetypes.getJSONObject(i);
-
-            graphManager.addVertexArchetype(vertexArchetype.getString("name"), vertexArchetype.getString("text"));
-        }
-    }
-
-    /**
-     * Loads the edge archetypes from the json and adds them to all edge archetypes.
-     * @param json
-     */
-    private void loadEdgeArchetypes(JSONObject json) {
-        JSONArray edgeArchetypes = json.getJSONArray("edgeArchetypes");
-        for (int i = 0; i < edgeArchetypes.size(); i++) {
-            JSONObject edgeArchetype = edgeArchetypes.getJSONObject(i);
-
-            graphManager.addEdgeArchetype(edgeArchetype.getString("name"), edgeArchetype.getString("text"));
-        }
-    }
-
-    /**
-     * Loads the vertices from the json and adds them to the list of all vertices.
-     * @param attributeTypes - json array with the attribute types
-     * @param json
-     */
-    private void loadVertices(JSONArray attributeTypes, JSONObject json) {
-        JSONArray verticesObject = json.getJSONArray("vertices");
-        for (int i = 0; i < verticesObject.size(); i++) {
-            JSONObject vertexObject = verticesObject.getJSONObject(i);
-            String name = vertexObject.getString("title");
-            String text = vertexObject.getString("text");
-            int archetypeIndex = vertexObject.getInt("archetype");
-            int vertexId = vertexObject.getInt("id");
-            vertexArchetypes.put(vertexId, archetypeIndex);
-
-            JSONObject attributesObject = vertexObject.getJSONObject("attributes");
-            Map<Integer, Attribute> attributes = loadObjectAttributes(attributesObject, attributeTypes);
-
-            graphManager.addVertex(vertexId, name, text, archetypeIndex, attributes);
-        }
-    }
-
-    /**
-     * Loads the edges from the json and adds them to the list of all edges.
-     * @param attributeTypes - List of attributes
-     * @param json
-     */
-    private void loadEdges(JSONArray attributeTypes, JSONObject json) {
-        JSONArray edgesObject = json.getJSONArray("edges");
-        for (int i = 0; i < edgesObject.size(); i++) {
-            JSONObject edgeObject = edgesObject.getJSONObject(i);
-            int edgeId = edgeObject.getInt("id");
-            int from = edgeObject.getInt("from");
-            int to = edgeObject.getInt("to");
-            String text = edgeObject.getString("text");
-            int archetypeIndex = edgeObject.getInt("archetype");
-            int fromArchetypeIndex = vertexArchetypes.get(from);
-            int toArchetypeIndex = vertexArchetypes.get(to);
-
-            JSONObject attributesObject = edgeObject.getJSONObject("attributes");
-            Map<Integer, Attribute> attributes = loadObjectAttributes(attributesObject, attributeTypes);
-
-            EdgeArchetypeInfo archetypeInfo = new EdgeArchetypeInfo(fromArchetypeIndex, archetypeIndex, toArchetypeIndex);
-            graphManager.addEdge(edgeId, from, to, text, archetypeInfo, attributes);
-        }
-    }
-
-    /**
-     * Loads all the attributes for the json object.
-     * @param attributesObject - json object for which to get the attributes
-     * @param attributeTypes - All types of attributes
-     * @return Map of attributes for the json object
-     */
-    private Map<Integer, Attribute> loadObjectAttributes(JSONObject attributesObject, JSONArray attributeTypes) {
-        Map<Integer, Attribute> attributes = new HashMap<>();
-        for (Object attributeKey : attributesObject.keySet()) {
-            Object attrValue = loadAttributeFromObject((String)attributeKey, attributeTypes, attributesObject);
-
-            int attributeTypeIndex = Integer.parseInt((String)attributeKey);
-            attributes.put(attributeTypeIndex, new Attribute(attributeTypeIndex, attrValue));
-        }
-
-        return attributes;
-    }
-
-    /**
-     * Loads single attribute from the json object
-     * @param attributeIdString - Attribute id as key
-     * @param attributeTypes - All the attributes types
-     * @param attributesObject - Object containing all the attributes for the current object
-     * @return Value of the attribute
-     */
-    private Object loadAttributeFromObject(String attributeIdString, JSONArray attributeTypes, JSONObject attributesObject) {
-        int attributeId = Integer.parseInt(attributeIdString);
-        String attrType = attributeTypes.getJSONObject(attributeId).getString("dataType");
-        Object attrValue;
-        switch (attrType) {
-            case "number":
-                String val = attributesObject.getString(attributeIdString);
-                attrValue = new BigDecimal(val);
-                break;
-            case "date":
-                String dateStr = attributesObject.getString(attributeIdString);
-                SimpleDateFormat format = new SimpleDateFormat(GraphJSONDataLoader.DATETIME_FORMAT);
-                attrValue = format.parse(dateStr, new ParsePosition(0));
-                break;
-            case "enum":
-                List<String> enumValues = new ArrayList<>();
-                JSONArray enumValuesArray = attributesObject.optJSONArray(attributeIdString);
-                if (enumValuesArray == null) {
-                    enumValues.add(attributesObject.getString(attributeIdString)); // Only one value present
-                } else {
-                    for (int j = 0; j < enumValuesArray.size(); j++) {
-                        enumValues.add(enumValuesArray.getString(j));
-                    }
-                }
-
-                graphManager.addUniquePossibleAttributeValues(attributeId, enumValues);
-                attrValue = graphManager.getEnumPositionsForAttrIndex(attributeId, enumValues);
-
-                break;
-            default:
-                attrValue = attributesObject.getString(attributeIdString);
-                break;
-        }
-
-        return attrValue;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/graph/loader/JSONConfigLoader.java b/sources/src/cz/zcu/kiv/offscreen/graph/loader/JSONConfigLoader.java
deleted file mode 100644
index cfb0e28..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/graph/loader/JSONConfigLoader.java
+++ /dev/null
@@ -1,393 +0,0 @@
-package cz.zcu.kiv.offscreen.graph.loader;
-
-import cz.zcu.kiv.offscreen.graph.AttributeType;
-import cz.zcu.kiv.offscreen.graph.EdgeArchetypeInfo;
-import cz.zcu.kiv.offscreen.graph.GraphManager;
-import cz.zcu.kiv.offscreen.graph.filter.*;
-import net.sf.json.JSONArray;
-import net.sf.json.JSONObject;
-import org.apache.commons.io.FileUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.text.ParsePosition;
-import java.text.SimpleDateFormat;
-import java.util.*;
-
-/**
- * Class is used to load the configuration file from disk.
- * The configuration file contains default filters, svgs for archetype icons
- * and other configurable application properties.
- *
- * @author Stepan Baratta
- */
-public class JSONConfigLoader {
-
-    private GraphManager graphManager;
-    private JSONObject json;
-
-    /**
-     * Path to the directory with configuration file.
-     */
-    private String pathToConfig;
-
-    public static String configFilename = "config.json";
-
-    public JSONConfigLoader(GraphManager graphManager, String pathToConfig) {
-        this.graphManager = graphManager;
-        this.pathToConfig = pathToConfig;
-    }
-
-    /**
-     * Loads the default filter into the {@code GraphFilter} object.
-     * @return {@code GraphFilter} with set values of the default filter.
-     */
-    public GraphFilter loadDefaultFilter() {
-        GraphFilter filter = new GraphFilter();
-
-        try {
-            //String filterJson = FileUtils.readFileToString(new File("D:\\aswi-git\\aswi\\config\\empty_filter.json"), "UTF-8");
-            String filterJson = FileUtils.readFileToString(new File(pathToConfig + "\\" + configFilename), "UTF-8");
-
-            json = JSONObject.fromObject(filterJson);
-
-            JSONObject defaultFilter = json.getJSONObject("defaultFilter");
-            JSONObject vertexArchetypeFilter = defaultFilter.getJSONObject("vertexArchetypeFilter");
-
-            processVertexArchetypeFilters(filter, vertexArchetypeFilter);
-
-            JSONObject edgeArchetypeFilter = defaultFilter.getJSONObject("edgeArchetypeFilter");
-
-            processEdgeArchetypeFilters(filter, edgeArchetypeFilter);
-
-            Object[][] vertexAttributeFilterStrings = loadAttributeFilters(defaultFilter.getJSONArray("vertexAttributeFilters"));
-
-            createVertexAttributeFilters(filter, vertexAttributeFilterStrings);
-
-            Object[][] edgeAttributeFilterStrings = loadAttributeFilters(defaultFilter.getJSONArray("edgeAttributeFilters"));
-
-            createEdgeAttributeFilters(filter, edgeAttributeFilterStrings);
-
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-
-        return filter;
-    }
-
-    /**
-     * Loads the edge archetypes from the json object.
-     * @param filter - Filter to be used.
-     * @param edgeArchetypeFilter - Json object containing the edge archetype filters.
-     */
-    private void processEdgeArchetypeFilters(GraphFilter filter, JSONObject edgeArchetypeFilter) {
-        JSONArray edgeFilterArchetypes = edgeArchetypeFilter.getJSONArray("archetypes");
-        String[][][] edgeArchetypeStrings = new String[edgeFilterArchetypes.size()][][];
-
-        for (int i = 0; i < edgeFilterArchetypes.size(); i++) {
-            edgeArchetypeStrings[i] = new String[3][];
-
-            JSONObject edgeFilterArchetype = edgeFilterArchetypes.getJSONObject(i);
-            JSONArray fromArchetypes = edgeFilterArchetype.getJSONArray("fromArchetypes");
-
-            edgeArchetypeStrings[i][0] = new String[fromArchetypes.size()];
-            for (int j = 0; j < fromArchetypes.size(); j++) {
-                edgeArchetypeStrings[i][0][j] = fromArchetypes.getString(j);
-            }
-
-            JSONArray edgeArchetypes = edgeFilterArchetype.getJSONArray("edgeArchetypes");
-            edgeArchetypeStrings[i][1] = new String[edgeArchetypes.size()];
-            for (int j = 0; j < edgeArchetypes.size(); j++) {
-                edgeArchetypeStrings[i][1][j] = edgeArchetypes.getString(j);
-            }
-
-            JSONArray toArchetypes = edgeFilterArchetype.getJSONArray("toArchetypes");
-            edgeArchetypeStrings[i][2] = new String[toArchetypes.size()];
-            for (int j = 0; j < toArchetypes.size(); j++) {
-                edgeArchetypeStrings[i][2][j] = toArchetypes.getString(j);
-            }
-        }
-
-        String edgeArchetypeMatchType = edgeArchetypeFilter.getString("matchType");
-
-        List<EdgeArchetypeInfo> edgeArchetypeFilterList = createEdgeArchetypeFilterList(edgeArchetypeStrings);
-
-        filter.setEdgeArchetypeFilter(edgeArchetypeFilterList, GraphFilter.ArchetypeMatchType.valueOf(edgeArchetypeMatchType.toUpperCase()));
-    }
-
-    /**
-     * Creates edge archetype filter list.
-     * @param edgeArchetypeStrings -
-     * @return
-     */
-    private List<EdgeArchetypeInfo> createEdgeArchetypeFilterList(String[][][] edgeArchetypeStrings) {
-        List<EdgeArchetypeInfo> edgeArchetypeFilterList = new ArrayList<>();
-        for (EdgeArchetypeInfo info : graphManager.edges.keySet()) {
-            for (String[][] edgeArchetypeString : edgeArchetypeStrings) {
-                boolean fromMatch = false;
-                boolean edgeMatch = false;
-                boolean toMatch = false;
-                String fromArchetype = graphManager.vertexArchetypes.get(info.fromArchetypeIndex).name;
-                String edgeArchetype = graphManager.edgeArchetypes.get(info.edgeArchetypeIndex).name;
-                String toArchetype = graphManager.vertexArchetypes.get(info.toArchetypeIndex).name;
-                for (int j = 0; j < edgeArchetypeString[0].length; j++) {
-                    fromMatch = (fromMatch || fromArchetype.equals(edgeArchetypeString[0][j]));
-                }
-                for (int j = 0; j < edgeArchetypeString[1].length; j++) {
-                    edgeMatch = (edgeMatch || edgeArchetype.equals(edgeArchetypeString[1][j]));
-                }
-                for (int j = 0; j < edgeArchetypeString[2].length; j++) {
-                    toMatch = (toMatch || toArchetype.equals(edgeArchetypeString[2][j]));
-                }
-                if (fromMatch && edgeMatch && toMatch) {
-                    edgeArchetypeFilterList.add(new EdgeArchetypeInfo(info.fromArchetypeIndex, info.edgeArchetypeIndex, info.toArchetypeIndex));
-                }
-            }
-        }
-        return edgeArchetypeFilterList;
-    }
-
-    /**
-     * Loads the vertex archetypes from the json object.
-     * @param filter - Filter to be used.
-     * @param vertexArchetypeFilter - Json object with the vertex archetype filters.
-     */
-    private void processVertexArchetypeFilters(GraphFilter filter, JSONObject vertexArchetypeFilter) {
-        JSONArray archetypes = vertexArchetypeFilter.getJSONArray("archetypes");
-
-        String[] vertexArchetypeStrings = new String[archetypes.size()];
-        for (int i = 0; i < archetypes.size(); i++) {
-            vertexArchetypeStrings[i] = archetypes.get(i).toString();
-        }
-
-        List<Integer> vertexArchetypeFilterList = new ArrayList<>();
-        for (int i = 0; i < graphManager.vertexArchetypes.size(); i++) {
-            for (String vertexArchetypeString : vertexArchetypeStrings) {
-                if (graphManager.vertexArchetypes.get(i).name.equals(vertexArchetypeString)) {
-                    vertexArchetypeFilterList.add(i);
-                }
-            }
-        }
-
-        String vertexArchetypeMatchType = vertexArchetypeFilter.getString("matchType");
-
-        filter.setVertexArchetypeFilter(vertexArchetypeFilterList, GraphFilter.ArchetypeMatchType.valueOf(vertexArchetypeMatchType.toUpperCase()));
-    }
-
-    /**
-     * Loads attribute filters from json array.
-     * @param attributeFilters - Json array with the attribute filters.
-     */
-    private Object[][] loadAttributeFilters(JSONArray attributeFilters) {
-        Object[][] attributeFilterStrings = new Object[attributeFilters.size()][3];
-
-        for (int i = 0; i < attributeFilters.size(); i++) {
-            JSONObject attributeFilter = attributeFilters.getJSONObject(i);
-            String archetypeName = attributeFilter.getString("archetype");
-            String attributeName = attributeFilter.getString("attributeName");
-
-            attributeFilterStrings[i][0] = archetypeName;
-            attributeFilterStrings[i][1] = attributeName;
-
-            JSONObject attributeFilterInfo = attributeFilter.getJSONObject("filter");
-            String filterMatchType = attributeFilterInfo.getString("matchType");
-
-            AttributeType attrType = graphManager.getAttributeDataTypeByName(attributeName);
-            switch (attrType.dataType) {
-                case ENUM:
-                    attributeFilterStrings[i][2] = getEnumAttributeFilter(attributeName, attributeFilterInfo, GraphFilter.EnumMatchType.valueOf(filterMatchType.toUpperCase()));
-                    break;
-                case NUMBER:
-                    attributeFilterStrings[i][2] = getNumberAttributeFilter(attributeFilterInfo, GraphFilter.NumberMatchType.valueOf(filterMatchType.toUpperCase()));
-                    break;
-                case DATE:
-                    attributeFilterStrings[i][2] = getDateAttributeFilter(attributeFilterInfo, GraphFilter.DateMatchType.valueOf(filterMatchType.toUpperCase()));
-                    break;
-                case STRING:
-                    attributeFilterStrings[i][2] = getStringAttributeFilter(attributeFilterInfo, GraphFilter.StringMatchType.valueOf(filterMatchType.toUpperCase()));
-                    break;
-            }
-        }
-
-        return attributeFilterStrings;
-    }
-
-    /**
-     * Sets the filtering objects from vertexAttributeFilterStrings to the graph filter object.
-     * @param filter - Graph filter object
-     * @param vertexAttributeFilterStrings - Array with attribute filter parameters (Archetype name, attribute name, filter object)
-     */
-    private void createVertexAttributeFilters(GraphFilter filter, Object[][] vertexAttributeFilterStrings) {
-        for (Object[] vertexAttributeFilterString : vertexAttributeFilterStrings) {
-            int archetypeIndex = graphManager.getVertexArchetypeIndex(vertexAttributeFilterString[0].toString());
-            int attributeIndex = graphManager.getAttributeIndex(vertexAttributeFilterString[1].toString());
-            GraphManager.AttributeDataType type = graphManager.attributeTypes.get(attributeIndex).dataType;
-            switch (type) {
-                case NUMBER:
-                    NumberAttributeFilter nf = (NumberAttributeFilter) vertexAttributeFilterString[2];
-                    filter.setVertexNumberAttributeFilter(archetypeIndex, attributeIndex, nf.getMin(), nf.getMax(), nf.isMinInclusive(), nf.isMaxInclusive(), nf.getMatchType());
-                    break;
-                case DATE:
-                    DateAttributeFilter df = (DateAttributeFilter) vertexAttributeFilterString[2];
-                    filter.setVertexDateAttributeFilter(archetypeIndex, attributeIndex, df.getMin(), df.getMax(), df.isMinInclusive(), df.isMaxInclusive(), df.getMatchType());
-                    break;
-                case STRING:
-                    StringAttributeFilter sf = (StringAttributeFilter) vertexAttributeFilterString[2];
-                    filter.setVertexStringAttributeFilter(archetypeIndex, attributeIndex, sf.getFilterValue(), sf.getMatchType());
-                    break;
-                case ENUM:
-                    EnumAttributeFilter ef = (EnumAttributeFilter) vertexAttributeFilterString[2];
-                    filter.setVertexEnumAttributeFilter(archetypeIndex, attributeIndex, ef.getValueIndices(), ef.getMatchType());
-                    break;
-            }
-        }
-    }
-
-    /**
-     * Sets the filtering objects from edgeAttributeFilterStrings to the graph filter object
-     * @param filter - Graph filter object
-     * @param edgeAttributeFilterStrings - Array with attribute filter parameters (Archetype name, attribute name, filter object)
-     */
-    private void createEdgeAttributeFilters(GraphFilter filter, Object[][] edgeAttributeFilterStrings) {
-        for (Object[] edgeAttributeFilterString : edgeAttributeFilterStrings) {
-            int archetypeIndex = graphManager.getEdgeArchetypeIndex(edgeAttributeFilterString[0].toString());
-            int attributeIndex = graphManager.getAttributeIndex(edgeAttributeFilterString[1].toString());
-            GraphManager.AttributeDataType type = graphManager.attributeTypes.get(attributeIndex).dataType;
-            switch (type) {
-                case NUMBER:
-                    NumberAttributeFilter nf = (NumberAttributeFilter) edgeAttributeFilterString[2];
-                    filter.setEdgeNumberAttributeFilter(archetypeIndex, attributeIndex, nf.getMin(), nf.getMax(), nf.isMinInclusive(), nf.isMaxInclusive(), nf.getMatchType());
-                    break;
-                case DATE:
-                    DateAttributeFilter df = (DateAttributeFilter) edgeAttributeFilterString[2];
-                    filter.setEdgeDateAttributeFilter(archetypeIndex, attributeIndex, df.getMin(), df.getMax(), df.isMinInclusive(), df.isMaxInclusive(), df.getMatchType());
-                    break;
-                case STRING:
-                    StringAttributeFilter sf = (StringAttributeFilter) edgeAttributeFilterString[2];
-                    filter.setEdgeStringAttributeFilter(archetypeIndex, attributeIndex, sf.getFilterValue(), sf.getMatchType());
-                    break;
-                case ENUM:
-                    EnumAttributeFilter ef = (EnumAttributeFilter) edgeAttributeFilterString[2];
-                    filter.setEdgeEnumAttributeFilter(archetypeIndex, attributeIndex, ef.getValueIndices(), ef.getMatchType());
-                    break;
-            }
-        }
-    }
-
-    /**
-     * Creates new string attribute filter with filter value from the json object. and returns it.
-     * @param vertexAttributeFilterInfo - Json object from which to extract the filter value.
-     * @param matchType - Type of matching in the filter.
-     * @return - new String attribute filter object.
-     */
-    private StringAttributeFilter getStringAttributeFilter(JSONObject vertexAttributeFilterInfo, GraphFilter.StringMatchType matchType) {
-        String filterValue = vertexAttributeFilterInfo.getString("value");
-
-        return new StringAttributeFilter(filterValue, matchType);
-    }
-
-    /**
-     * Creates new date attribute filter with filter value from the json object. and returns it.
-     * @param vertexAttributeFilterInfo - Json object from which to extract the filter value.
-     * @param matchType- Type of matching in the filter.
-     * @return - new Date attribute filter object.
-     */
-    private DateAttributeFilter getDateAttributeFilter(JSONObject vertexAttributeFilterInfo, GraphFilter.DateMatchType matchType) {
-        String min = vertexAttributeFilterInfo.getString("min");
-        String max = vertexAttributeFilterInfo.getString("max");
-        boolean minInclusive = vertexAttributeFilterInfo.getBoolean("minInclusive");
-        boolean maxInclusive = vertexAttributeFilterInfo.getBoolean("maxInclusive");
-
-        SimpleDateFormat format = new SimpleDateFormat(GraphJSONDataLoader.DATETIME_FORMAT);
-        Date minDate, maxDate;
-
-        minDate = format.parse(min, new ParsePosition(0));
-        maxDate = format.parse(max, new ParsePosition(0));
-
-        return new DateAttributeFilter(minDate, maxDate, minInclusive, maxInclusive, matchType);
-    }
-
-    /**
-     * Creates new number attribute filter with filter value from the json object. and returns it.
-     * @param vertexAttributeFilterInfo - Json object from which to extract the filter value.
-     * @param matchType - Type of matching in the filter.
-     * @return - new Number attribute filter object.
-     */
-    private NumberAttributeFilter getNumberAttributeFilter(JSONObject vertexAttributeFilterInfo, GraphFilter.NumberMatchType matchType) {
-        BigDecimal min = new BigDecimal(vertexAttributeFilterInfo.getInt("min"));
-        BigDecimal max = new BigDecimal(vertexAttributeFilterInfo.getInt("max"));
-        boolean minInclusive = vertexAttributeFilterInfo.getBoolean("minInclusive");
-        boolean maxInclusive = vertexAttributeFilterInfo.getBoolean("maxInclusive");
-
-        return new NumberAttributeFilter(min, max, minInclusive, maxInclusive, matchType);
-    }
-
-    /**
-     * Loads all the enum values for filtering and returns a list of indexes for those enum values.
-     * @param vertexAttributeName - Name of the vertex attribute for which to get the enum values.
-     * @param vertexAttributeFilterInfo - Json object containing the enum values.
-     * @return Enum attribute filter.
-     */
-    private EnumAttributeFilter getEnumAttributeFilter(String vertexAttributeName, JSONObject vertexAttributeFilterInfo, GraphFilter.EnumMatchType matchType) {
-        List<Integer> valueIndices = new ArrayList<>();
-
-        JSONArray values = vertexAttributeFilterInfo.getJSONArray("values");
-        for (int j = 0; j < values.size(); j++) {
-            String value = values.getString(j);
-            int index = graphManager.getEnumValueIndex(graphManager.getAttributeIndex(vertexAttributeName), value);
-            valueIndices.add(index);
-        }
-
-        return new EnumAttributeFilter(valueIndices, matchType);
-    }
-
-    /**
-     * Loads the archetype icons from the configuration file.
-     * @return -  Map where key is the name of archetype icon and the value is the svg description.
-     */
-    public Map<String, String> loadArchetypeIcons() {
-        Map<String, String> archetypeIcons = new HashMap<>();
-
-        JSONArray archetypeIconsJson = json.getJSONArray("archetypeIcons");
-        for (int i = 0; i < archetypeIconsJson.size(); i++) {
-            JSONObject icon = archetypeIconsJson.getJSONObject(i);
-            String archetypeName = icon.getString("name");
-            String iconSvg = icon.getString("value");
-
-            archetypeIcons.put(archetypeName, iconSvg);
-        }
-
-        return archetypeIcons;
-    }
-
-    /**
-     * Loads default group archetypes.
-     * @return list of indices of archetypes.
-     */
-    public List<Integer> loadGroupArchetypes() {
-        List<Integer> defaultGroupArchetypes = new ArrayList<>();
-
-        JSONArray defaultGroupArchetypesJson = json.getJSONArray("defaultGroupArchetypes");
-        for (int i = 0; i < defaultGroupArchetypesJson.size(); i++) {
-            String archetype = defaultGroupArchetypesJson.get(i).toString();
-            defaultGroupArchetypes.add(graphManager.getVertexArchetypeIndex(archetype));
-        }
-
-        return defaultGroupArchetypes;
-    }
-
-    /**
-     * Loads default group archetypes and return them in a list.
-     * @return list of archetypes.
-     */
-    public List<String> loadGroupArchetypesStrings(){
-        List<String> groupArchetypes = new ArrayList<>();
-
-        JSONArray defaultGroupArchetypesJson = json.getJSONArray("defaultGroupArchetypes");
-        for (Object jsonItem : defaultGroupArchetypesJson) {
-            groupArchetypes.add(jsonItem.toString());
-        }
-        return groupArchetypes;
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/loader/configuration/ConfigurationLoader.java b/sources/src/cz/zcu/kiv/offscreen/loader/configuration/ConfigurationLoader.java
deleted file mode 100644
index 3c1ff2d..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/loader/configuration/ConfigurationLoader.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package cz.zcu.kiv.offscreen.loader.configuration;
-
-import java.io.IOException;
-import javax.servlet.ServletContext;
-
-/**
- * 
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class ConfigurationLoader {
-
-	public static final String PROP_STORAGE_LOCATION = "storageLocation";
-	public static final String PROP_CONFIG_LOCATION = "configLocation";
-
-	/**
-	 * Get storage location property from web.xml.
-	 *
-	 * @param context App context.
-	 * @return Storage location path.
-	 * @throws IOException
-	 */
-	public static String getStorageLocation(ServletContext context) throws IOException {
-		return context.getInitParameter(PROP_STORAGE_LOCATION);
-	}
-
-	/**
-	 * Get configuration location property from web.xml.
-	 *
-	 * @param context App context.
-	 * @return Storage location path.
-	 * @throws IOException
-	 */
-	public static String getConfigLocation(ServletContext context) throws IOException {
-		return context.getInitParameter(PROP_CONFIG_LOCATION);
-	}
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/DefaultPage.java b/sources/src/cz/zcu/kiv/offscreen/servlets/DefaultPage.java
deleted file mode 100644
index 7813e35..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/DefaultPage.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
-import cz.zcu.kiv.offscreen.session.SessionManager;
-import cz.zcu.kiv.offscreen.storage.FileManager;
-import cz.zcu.kiv.offscreen.user.DB;
-import cz.zcu.kiv.offscreen.user.Diagram;
-
-/**
- *
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class DefaultPage extends HttpServlet {
-
-    /**
-     * Loads currently uploaded components and renders uploadFiles.jsp.
-     */
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        String sessionValue = SessionManager.getSessionValue(request, "JSESSIONID");
-        if (sessionValue != null && !"".equals(sessionValue)) {
-            String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
-
-            FileManager fileManager = new FileManager(sessionValue, storageLocation);
-            if (!fileManager.isExistStorage()) {
-                fileManager.createStorageDirectory();
-            }
-
-            request.setAttribute("componentNames", fileManager.getUploadedComponentsNames());
-        }
-        
-        DB db = new DB(getServletContext()); 
-        Diagram diagram_list = new Diagram(db);
-
-        List<Map<String, String>> list = new ArrayList<>();
-        if (request.getSession().getAttribute("logged_user") == "1") {
-			list = diagram_list.getDiagramListByUserId((int) request.getSession().getAttribute("logged_user_id"));
-        }
-
-        List<Map<String, String>> diagram_public_list = diagram_list.getDiagramPublicList();
-
-        request.setAttribute("diagramPublic", diagram_public_list);
-        request.setAttribute("diagramNames", list);
-
-        // render
-        RequestDispatcher rd = getServletContext().getRequestDispatcher("/uploadFiles.jsp");
-        rd.forward(request, response);
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/EfpImport.java b/sources/src/cz/zcu/kiv/offscreen/servlets/EfpImport.java
deleted file mode 100644
index 91f298f..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/EfpImport.java
+++ /dev/null
@@ -1,48 +0,0 @@
-//package cz.zcu.kiv.offscreen.servlets;
-//
-//import java.io.IOException;
-//import javax.servlet.RequestDispatcher;
-//import javax.servlet.ServletException;
-//import javax.servlet.http.HttpServlet;
-//import javax.servlet.http.HttpServletRequest;
-//import javax.servlet.http.HttpServletResponse;
-//
-//import org.apache.log4j.Logger;
-//
-//import cz.zcu.kiv.offscreen.efp.utils.JsonTransformer;
-//
-///**
-// * Servlet used for serving JSON data incoming from efpPortal app.
-// *
-// * @author Jiri Loudil
-// */
-//public class EfpImport extends HttpServlet {
-//	private static final long serialVersionUID = 1L;
-//
-//	private Logger logger = Logger.getLogger(LoadGraphData.class);
-//
-//	@Override
-//	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-//		String data = request.getParameter("data");
-//
-//		// invalid data set
-//		if (data == null || data.isEmpty()) {
-//			logger.error("Data in message are null.");
-//			return;
-//		}
-//
-//		JsonTransformer transformer = new JsonTransformer();
-//
-//		request.setAttribute("graph_json",true);
-//
-//		// set the referrer for 'Back' graph button functionality
-//		request.setAttribute("efpPortalRefererUrl", request.getHeader("referer"));
-//
-//		request.getSession().setAttribute("graph_json_data", transformer.transformInputJSONToGraphJSON(data, request));
-//
-//		// render
-//		RequestDispatcher rd = getServletContext().getRequestDispatcher("/showGraph.jsp");
-//		rd.forward(request, response);
-//	}
-//
-//}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/LoadGraphData.java b/sources/src/cz/zcu/kiv/offscreen/servlets/LoadGraphData.java
deleted file mode 100644
index 17526b4..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/LoadGraphData.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets;
-
-import cz.zcu.kiv.offscreen.graph.Graph;
-import cz.zcu.kiv.offscreen.api.GraphExport;
-import cz.zcu.kiv.offscreen.graph.GraphManager;
-import cz.zcu.kiv.offscreen.graph.loader.DemoDiagramLoader;
-import cz.zcu.kiv.offscreen.graph.loader.GraphJSONDataLoader;
-import cz.zcu.kiv.offscreen.graph.loader.JSONConfigLoader;
-import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
-import cz.zcu.kiv.offscreen.session.SessionManager;
-import cz.zcu.kiv.offscreen.storage.FileManager;
-import net.sf.json.JSONObject;
-
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class LoadGraphData extends HttpServlet {
-
-    /**
-     * Constructs graph data using either the current graph version or the version set in query parameter. Resulting
-     * graph is returned as JSON in response body.
-     */
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
-        // initialize file manager
-        String workingDirectory;
-        if (request.getParameter("diagram_hash") == null) {
-            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
-        } else {
-            workingDirectory = request.getParameter("diagram_hash");
-        }
-
-        if (request.getParameter("graphVersion") != null) {
-            workingDirectory += File.separator + request.getParameter("graphVersion");
-        } else {
-            workingDirectory += File.separator + SessionManager.getSessionValue(request, "graphVersion");
-        }
-
-        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
-
-        FileManager fileManager = new FileManager(workingDirectory, storageLocation);
-        response.setContentType("application/json");
-
-        if (request.getSession().getAttribute("demo_id") == null) {
-            // it doesn't have EFPs -> read from ComAV
-            if (request.getSession().getAttribute("graph_json_data") == null) {
-                File[] uploadedFiles = fileManager.getUploadedComponents().toArray(new File[0]);
-                File fileToDisplay = uploadedFiles[0];
-
-                GraphManager graphManager = new GraphJSONDataLoader(fileToDisplay).LoadData();
-                String configLocation = ConfigurationLoader.getConfigLocation(request.getServletContext());
-                JSONConfigLoader configLoader = new JSONConfigLoader(graphManager, configLocation);
-                Graph graph = graphManager.createGraph(configLoader);
-                GraphExport export = new GraphExport(graph);
-                JSONObject json = JSONObject.fromObject(export);
-
-                String resultJsonString = json.toString();
-
-                response.getWriter().write(resultJsonString);
-
-            } else {
-                // it has EFPs -> read from the session
-                response.getWriter().write(request.getSession().getAttribute("graph_json_data").toString());
-
-                request.getSession().removeAttribute("graph_json_data");
-            }
-
-        } else {
-            String demoId = request.getSession().getAttribute("demo_id").toString();
-            String path = "/WEB-INF" + File.separator + "demoDiagram" + File.separator + demoId + ".json";
-
-            DemoDiagramLoader loader = new DemoDiagramLoader();
-            InputStream in = this.getServletContext().getResourceAsStream(path);
-
-            response.getWriter().write(loader.readDemoJSONFromFile(in));
-
-            request.getSession().setAttribute("demo_id", null);
-        }
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/Login.java b/sources/src/cz/zcu/kiv/offscreen/servlets/Login.java
deleted file mode 100644
index 02817f1..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/Login.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets;
-
-import java.io.IOException;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import cz.zcu.kiv.offscreen.user.DB;
-import cz.zcu.kiv.offscreen.user.User;
-
-public class Login  extends HttpServlet {
-
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        Cookie cookie = new Cookie("framework", request.getParameter("framework"));
-        response.addCookie(cookie);
-        
-        DB db = new DB(getServletContext());
-        User logged_user_c = new User(db);
-
-        if (logged_user_c.login(request.getParameter("login_name"), request.getParameter("password"))) {
-            request.getSession().setAttribute("logged_user", "1");
-            request.getSession().setAttribute("logged_user_id", logged_user_c.getId() );
-            request.getSession().setAttribute("logged_user_nick", logged_user_c.getNick());
-        } else {
-            request.getSession().setAttribute("logged_user", "0");
-            request.getSession().setAttribute("logged_user_nick", "");
-            request.getSession().setAttribute("logged_user_err", "1");
-            request.getSession().setAttribute("logged_user_err_name", request.getParameter("login_name"));
-        }
-
-        // redirect
-        response.sendRedirect(getServletContext().getInitParameter("HOME_URL"));
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/Logout.java b/sources/src/cz/zcu/kiv/offscreen/servlets/Logout.java
deleted file mode 100644
index 01724e4..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/Logout.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets;
-
-import java.io.IOException;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public class Logout extends HttpServlet {
-	
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        request.getSession().setAttribute("logged_user", null);
-        request.getSession().setAttribute("logged_user_id", null);
-        request.getSession().setAttribute("logged_user_nick", null);
-
-        // redirect
-        response.sendRedirect(getServletContext().getInitParameter("HOME_URL"));
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/Register.java b/sources/src/cz/zcu/kiv/offscreen/servlets/Register.java
deleted file mode 100644
index 55c2f0b..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/Register.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.json.JSONObject;
-
-import cz.zcu.kiv.offscreen.user.DB;
-import cz.zcu.kiv.offscreen.user.User;
-
-public class Register extends HttpServlet {
-    
-    private static final String EMAIL_ADDRESS_PATTERN = "^[A-Za-z0-9-\\+_]+(\\.[A-Za-z0-9-_]+)*@" +
-    											"[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*" +
-    											"(\\.[A-Za-z]{2,})$";
-    
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-    	DB db = new DB(getServletContext());
-    	User user = new User(db);
-    	
-    	String err = "";
-    	if (request.getParameter("user_name") == null || request.getParameter("user_name").length() == 0) {
-    		err += "Please fill name.";
-		}
-
-    	if (request.getParameter("user_email") == null || request.getParameter("user_email").length() == 0) {
-    		err += "Please fill e-mail address.";
-    	} else if (user.existsEmail(request.getParameter("user_email"))) {
-    		err += "E-mail already exists.";
-    	} else if (!isEmailAddressValid(request.getParameter("user_email"))) {
-    		err += "Please correct e-mail address.";
-    	}
-
-    	if (request.getParameter("user_nick") == null || request.getParameter("user_nick").length() == 0) {
-    		err += "Please fill nickname.";
-    	} else if (user.existsNick(request.getParameter("user_nick"))) {
-    		err += "Nickname already exists.";
-    	}
-    	
-    	if (request.getParameter("user_password") == null || request.getParameter("user_password").length() == 0 ||
-    	     request.getParameter("user_password_2") == null || request.getParameter("user_password_2").length() == 0) {
-    		err += "Please fill password.";
-    	} else if (request.getParameter("user_password").compareTo(request.getParameter("user_password_2")) != 0) {
-    		err += "Passwords must be same.";    		
-    	} else if (request.getParameter("user_password").length() <= 4) {
-    		err += "Passwords must be at least 5 characters long.";
-    	}
-
-		JSONObject jsonObject = new JSONObject();
-    	
-    	if (err.length() == 0) {
-    		Map<String, String> user_param = new HashMap<>();
-    		user_param.put("name", request.getParameter("user_name"));
-    		user_param.put("email", request.getParameter("user_email"));
-    		user_param.put("nick", request.getParameter("user_nick"));
-    		user_param.put("password", request.getParameter("user_password"));
-    		user_param.put("session", request.getSession().getId());
-
-    		user.register(user_param);
-    		
-    		jsonObject.put("ok", "ok");
-
-    	} else {
-    		jsonObject.put("err", err);
-    		response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
-    	}
-
-		response.setContentType("application/json");
-		response.getWriter().write(jsonObject.toString());
-		response.getWriter().flush();
-    }
-    
-    /**
-     * Method verify validity of email address
-     * 
-     * @param emailAddress - email address
-     * @return true - email address is ok
-     * 		   false - email address is not correct
-     */
-    private boolean isEmailAddressValid(String emailAddress) {
-    	Pattern pattern = Pattern.compile(EMAIL_ADDRESS_PATTERN);
-    	Matcher matcher = pattern.matcher(emailAddress);
-		return matcher.matches();
-    }
-	
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/ShowGraph.java b/sources/src/cz/zcu/kiv/offscreen/servlets/ShowGraph.java
deleted file mode 100644
index 103a444..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/ShowGraph.java
+++ /dev/null
@@ -1,153 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
-import cz.zcu.kiv.offscreen.session.SessionManager;
-import cz.zcu.kiv.offscreen.storage.FileManager;
-import cz.zcu.kiv.offscreen.user.DB;
-import cz.zcu.kiv.offscreen.user.Diagram;
-
-/**
- *
- * @author Jindra PavlĂ­kovĂˇ <jindra.pav2@seznam.cz>
- */
-public class ShowGraph extends HttpServlet {
-
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-    	// render
-        RequestDispatcher rd = getServletContext().getRequestDispatcher("/showGraph.jsp");
-        rd.forward(request, response);
-    }
-
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-		// framework
-        String framework = request.getParameter("framework") == null ? "osgi" : request.getParameter("framework");
-        response.addCookie(new Cookie("framework", framework));
-
-        // should save button be displayed?
-		boolean showSaveButton = request.getParameter("diagram_id") != null && request.getParameter("diagram_hash") != null;
-		request.setAttribute("show_icon_save", showSaveButton);
-
-		// is it only a demo diagram?
-		if (request.getParameter("demo_id") != null) {
-			request.getSession().setAttribute("demo_id", request.getParameter("demo_id"));
-		}
-
-		if (request.getParameter("diagram_name") != null && request.getParameter("diagram_id") == null) {
-			// save new diagram
-        	String sessionValue = SessionManager.getSessionValue(request, "JSESSIONID");
-        	String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
-			FileManager file_manage_without_id = new FileManager(sessionValue, storageLocation);
-
-        	String isPublic = "0";
-        	if (request.getParameter("public_diagram") != null && request.getParameter("public_diagram").compareTo("1") == 0) {
-        		isPublic = "1";
-        	}
-
-			Map<String, String> item_map = new HashMap<>();
-        	item_map.put("diagram_name", request.getParameter("diagram_name"));
-        	item_map.put("hash", sessionValue);
-        	item_map.put("user_id",  request.getSession().getAttribute("logged_user_id").toString());
-        	item_map.put("component_count", Integer.toString(file_manage_without_id.getUploadedComponentsNames().size()));
-        	item_map.put("public", isPublic);
-
-			DB db = new DB(getServletContext());
-			Diagram diagram = new Diagram(db);
-			diagram.update(item_map);
-
-            String file_directory = sessionValue + "_" + diagram.getIdStr();
-        	FileManager file_manage = new FileManager(file_directory, storageLocation);
-        	if (!file_manage.isExistStorage()) {
-        		file_manage.createStorageDirectory();
-        	}
-        	
-        	//copy directory to directory with postfix "_<id_diagram>"
-        	file_manage_without_id.copyUploadedComponents(storageLocation + File.separator + file_directory);
-
-        	response.sendRedirect( getServletContext().getInitParameter("HOME_URL") + "graph?diagram_id=" + diagram.getIdStr() + "&diagram_hash=" + sessionValue);
-        	return;
-        	
-        } else if (request.getParameter("diagram_name") != null && request.getParameter("diagram_id") != null) {
-        	// update existing diagram
-        	Integer diagramId = Integer.parseInt(request.getParameter("diagram_id"));
-
-        	String sessionValue = SessionManager.getSessionValue(request, "JSESSIONID");
-        	String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
-        	
-        	DB db = new DB(getServletContext());
-        	Diagram diagram = new Diagram(db, diagramId);
-            Map<String, String> diag_param = diagram.getDiagramParam(diagramId);
-
-			if (request.getSession().getAttribute("logged_user_id") != null) {
-				boolean doCopyDiagram = request.getParameter("copy_diag") != null && request.getParameter("copy_diag").compareTo("1") == 0;
-				if (doCopyDiagram) {
-					String diagramHash = diag_param.get("hash");
-					String vertices_position = diag_param.get("vertices_position");
-
-					FileManager copied_file_manage = new FileManager(diagramHash, storageLocation);
-					if (!copied_file_manage.isExistStorage()) {
-						copied_file_manage.createStorageDirectory();
-					}
-					copied_file_manage.copyUploadedComponents(storageLocation + File.separator + sessionValue);
-
-					Map<String, String> new_item_map = new HashMap<>();
-					new_item_map.put("diagram_name", request.getParameter("diagram_name"));
-					new_item_map.put("hash", sessionValue);
-					new_item_map.put("user_id", request.getSession().getAttribute("logged_user_id").toString());
-					new_item_map.put("component_count", Integer.toString(copied_file_manage.getUploadedComponentsNames().size()));
-					new_item_map.put("public", "0");
-					new_item_map.put("vertices_position", vertices_position);
-
-					Diagram newDiagram = new Diagram(db);
-					newDiagram.update(new_item_map);
-
-					FileManager file_manage = new FileManager(sessionValue, storageLocation);
-					if (!file_manage.isExistStorage()) {
-						file_manage.createStorageDirectory();
-					}
-
-					//copy directory to directory with postfix "_<id_diagram>"
-					copied_file_manage.copyUploadedComponents(storageLocation + File.separator + sessionValue);
-
-					response.sendRedirect(getServletContext().getInitParameter("HOME_URL") + "graph?diagram_id=" + newDiagram.getIdStr() + "&diagram_hash=" + sessionValue);
-					return;
-				}
-
-				if (request.getSession().getAttribute("logged_user_id").toString().equals(diag_param.get("user_id"))) {
-					String diagramHash = diag_param.get("hash");
-					FileManager file_manage = new FileManager(diagramHash, storageLocation);
-
-					String public_diag = "0";
-					if (request.getParameter("public_diagram") != null && request.getParameter("public_diagram").compareTo("1") == 0) {
-						public_diag = "1";
-					}
-
-					Map<String, String> item_map = new HashMap<>();
-					item_map.put("component_count", Integer.toString(file_manage.getUploadedComponentsNames().size()));
-					item_map.put("diagram_name", request.getParameter("diagram_name"));
-					item_map.put("public", public_diag);
-
-					diagram.update(item_map);
-				}
-			}
-
-			request.getSession().setAttribute("id_diagram", request.getParameter("id_diagram"));
-        }
-
-        // render
-		RequestDispatcher rd = getServletContext().getRequestDispatcher("/showGraph.jsp");
-		rd.forward(request, response);
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/CopyComponents.java b/sources/src/cz/zcu/kiv/offscreen/servlets/actions/CopyComponents.java
deleted file mode 100644
index 03364fc..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/CopyComponents.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets.actions;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.ParseException;
-import java.util.List;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.json.JSONArray;
-import org.json.JSONObject;
-
-import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
-import cz.zcu.kiv.offscreen.session.SessionManager;
-import cz.zcu.kiv.offscreen.storage.FileManager;
-
-/**
- * @author Pavel Fidransky [jsem@pavelfidransky.cz]
- */
-public class CopyComponents extends HttpServlet {
-
-    /**
-     * Makes a copy of components stored in the current graph version folder to the (current + 1) folder. Components to
-     * be copied are set by input JSON.
-     */
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        // read input data
-        StringBuilder sb = new StringBuilder();
-        try (BufferedReader reader = request.getReader()) {
-            String line;
-            while ((line = reader.readLine()) != null) {
-                sb.append(line);
-            }
-        }
-
-        // parse the data as JSON
-        JSONObject componentsJson;
-        try {
-            componentsJson = new JSONObject(sb.toString());
-        } catch (ParseException e) {
-            response.sendError(response.SC_BAD_REQUEST);
-            return;
-        }
-
-        // get current graph version from cookie
-        int version = Integer.parseInt(SessionManager.getSessionValue(request, "graphVersion"));
-
-        // initialize file manager
-        String workingDirectory;
-        if (request.getParameter("diagram_hash") == null) {
-            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
-        } else {
-            workingDirectory = request.getParameter("diagram_hash");
-        }
-
-        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
-
-        FileManager oldFileManager = new FileManager(workingDirectory + File.separator + String.valueOf(version), storageLocation);
-        FileManager newFileManager = new FileManager(workingDirectory + File.separator + String.valueOf(version + 1), storageLocation);
-
-        List<String> currentComponents = oldFileManager.getUploadedComponentsNames();
-
-        // copy components
-        JSONArray components = componentsJson.getJSONArray("components");
-        for (int i = 0; i < components.length(); i++) {
-            JSONObject component = components.getJSONObject(i);
-            String name = component.getString("name");
-
-            if (!currentComponents.contains(name)) continue;
-
-            String oldPath = storageLocation + File.separator + workingDirectory + File.separator + String.valueOf(version) + File.separator + name;
-            newFileManager.saveFile(new FileInputStream( oldPath), name);
-        }
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DeleteAllComponents.java b/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DeleteAllComponents.java
deleted file mode 100644
index 1331a86..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DeleteAllComponents.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets.actions;
-
-import java.io.File;
-import java.io.IOException;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
-import cz.zcu.kiv.offscreen.session.SessionManager;
-import cz.zcu.kiv.offscreen.storage.FileManager;
-
-/**
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class DeleteAllComponents extends HttpServlet {
-
-    /**
-     * Delete all components from the graph. Optionally, only components of a particular graph version set in query
-     * parameter can be deleted. For AJAX requests, 204 NO_CONTENT status code is returned.
-     */
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        String workingDirectory;
-        if (request.getParameter("diagram_hash") == null) {
-            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
-        } else {
-            workingDirectory = request.getParameter("diagram_hash");
-        }
-
-        if (request.getParameter("graphVersion") != null) {
-            workingDirectory += File.separator + request.getParameter("graphVersion");
-        }
-
-        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
-        
-        FileManager fileManager = new FileManager(workingDirectory, storageLocation);
-        fileManager.deleteAllFiles();
-
-        String requestedWith = request.getHeader("X-Requested-With");
-        if (requestedWith != null && requestedWith.equals("XMLHttpRequest")) {
-            // AJAX request, send response
-            response.setStatus(response.SC_NO_CONTENT);
-
-        } else {
-            request.setAttribute("componentNames", fileManager.getUploadedComponentsNames());
-
-            // redirect
-            response.sendRedirect(getServletContext().getInitParameter("HOME_URL") + "upload-files");
-        }
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DeleteComponent.java b/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DeleteComponent.java
deleted file mode 100644
index a8058ef..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DeleteComponent.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
-import cz.zcu.kiv.offscreen.session.SessionManager;
-import cz.zcu.kiv.offscreen.storage.FileManager;
-import cz.zcu.kiv.offscreen.user.DB;
-import cz.zcu.kiv.offscreen.user.Diagram;
-
-/**
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class DeleteComponent extends HttpServlet {
-
-    /**
-     * Deleted a single component from either the current graph version or the version set in query parameter. For AJAX
-     * requests, 204 NO_CONTENT status code is returned.
-     */
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        String workingDirectory;
-        if (request.getParameter("diagram_hash") == null) {
-            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
-        } else {
-            workingDirectory = request.getParameter("diagram_hash");
-        }
-
-        if (request.getParameter("graphVersion") != null) {
-            workingDirectory += File.separator + request.getParameter("graphVersion");
-        } else {
-            workingDirectory += File.separator + SessionManager.getSessionValue(request, "graphVersion");
-        }
-
-        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
-
-        boolean doDeleteComponent = true;
-        String redirectUrlParams = "";
-
-        if (request.getParameter("diagram_id") != null && request.getParameter("diagram_hash") != null) {
-            Integer diagramId = Integer.parseInt(request.getParameter("id_diagram"));
-
-            DB db = new DB(getServletContext());
-            Diagram diagram = new Diagram(db, diagramId);
-            Map<String, String> diag_param = diagram.getDiagramParam(diagramId);
-
-            if (request.getSession().getAttribute("logged_user_id") == null) {
-        		doDeleteComponent = false;
-            } else if (request.getSession().getAttribute("logged_user_id").toString().equals(diag_param.get("user_id"))) {
-            	doDeleteComponent = true;
-        	} else {
-        		doDeleteComponent = false;
-        	}
-
-            redirectUrlParams = "?diagram_id=" + request.getParameter("diagram_id") + "&diagram_hash=" + request.getParameter("diagram_hash");
-        }
-        
-        if (doDeleteComponent) {
-	        FileManager fileManager = new FileManager(workingDirectory, storageLocation);
-	        fileManager.deleteFile(request.getParameter("name"));
-
-	        request.setAttribute("componentNames", fileManager.getUploadedComponentsNames());
-        }
-
-        String requestedWith = request.getHeader("X-Requested-With");
-        if (requestedWith != null && requestedWith.equals("XMLHttpRequest")) {
-            // AJAX request, send response
-            response.setStatus(response.SC_NO_CONTENT);
-
-        } else {
-            // redirect
-            response.sendRedirect(getServletContext().getInitParameter("HOME_URL") + "upload-files" + redirectUrlParams);
-        }
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DiagramEndpoint.java b/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DiagramEndpoint.java
deleted file mode 100644
index 58a7ba5..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DiagramEndpoint.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets.actions;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Map;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
-import cz.zcu.kiv.offscreen.storage.FileManager;
-import cz.zcu.kiv.offscreen.user.DB;
-import cz.zcu.kiv.offscreen.user.Diagram;
-
-public class DiagramEndpoint extends HttpServlet {
-
-    /**
-     * Returns position of components in diagram by id and hash code.
-     */
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        // diagram ID is not set
-        if (request.getParameter("id_diagram") == null) {
-            response.sendError(response.SC_BAD_REQUEST);
-            return;
-        }
-
-        Integer diagramId = Integer.parseInt(request.getParameter("diagram_id"));
-
-        DB db = new DB(getServletContext());
-        Diagram diagram = new Diagram(db);
-        Map<String, String> diag_param = diagram.getDiagramParam(diagramId);
-
-        // user is not owner of the diagram
-        if (!request.getSession().getAttribute("logged_user_id").toString().equals(diag_param.get("user_id"))) {
-            response.sendError(response.SC_UNAUTHORIZED);
-            return;
-        }
-
-        // send response
-        response.setContentType("application/json");
-
-        PrintWriter out = response.getWriter();
-        out.write(diag_param.get("vertices_position"));
-        out.flush();
-    }
-
-    /**
-     * Method saves position of component, which are send by parameter in post method.
-     */
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        // user is not logged in
-        if (request.getSession().getAttribute("logged_user_id") == null) {
-            response.sendError(response.SC_UNAUTHORIZED);
-            return;
-        }
-
-        // diagram ID is not set
-        if (request.getParameter("id_diagram") == null) {
-            response.sendError(response.SC_BAD_REQUEST);
-            return;
-        }
-
-        Integer diagramId = Integer.parseInt(request.getParameter("diagram_id"));
-
-        DB db = new DB(getServletContext());
-        Diagram diagram = new Diagram(db, diagramId);
-        Map<String, String> diag_param = diagram.getDiagramParam(diagramId);
-
-        // user is not owner of the diagram
-        if (!request.getSession().getAttribute("logged_user_id").toString().equals(diag_param.get("user_id"))) {
-            response.sendError(response.SC_UNAUTHORIZED);
-            return;
-        }
-
-        String verticesPosition = request.getParameter("vertices_position");
-        diagram.updateVerticesPosition(verticesPosition);
-
-        // send response
-        response.setContentType("application/json");
-
-        PrintWriter out = response.getWriter();
-        out.write(verticesPosition);
-        out.flush();
-    }
-
-    /**
-     * Deletes diagram from database and from file system.
-     * Id of diagrams is loaded from get parameter in url.
-     * In method is controlled logged user and user, who uploaded diagram.
-     */
-    @Override
-    protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        // user is not logged in
-        if (request.getSession().getAttribute("logged_user_id") == null) {
-            response.sendError(response.SC_UNAUTHORIZED);
-            return;
-        }
-
-        // diagram ID is not set
-        if (request.getParameter("id_diagram") == null) {
-            response.sendError(response.SC_BAD_REQUEST);
-            return;
-        }
-
-        Integer diagramId = Integer.parseInt(request.getParameter("id_diagram"));
-
-        DB db = new DB(getServletContext());
-        Diagram diagram = new Diagram(db, diagramId);
-        Map<String, String> diag_param = diagram.getDiagramParam(diagramId);
-
-        // user is not owner of the diagram
-        if (!request.getSession().getAttribute("logged_user_id").toString().equals(diag_param.get("user_id"))) {
-            response.sendError(response.SC_UNAUTHORIZED);
-            return;
-        }
-
-        String workingDirectory = diag_param.get("hash") + "_" + diag_param.get("id");
-        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
-
-        FileManager fileManager = new FileManager(workingDirectory, storageLocation);
-        fileManager.deleteAllFiles();
-        fileManager.deleteDirectory();
-
-        diagram.delete();
-
-        // send response
-        response.setStatus(response.SC_NO_CONTENT);
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DownloadComponent.java b/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DownloadComponent.java
deleted file mode 100644
index 1be3897..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/DownloadComponent.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.log4j.Logger;
-import org.json.JSONObject;
-
-import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
-import cz.zcu.kiv.offscreen.session.SessionManager;
-import cz.zcu.kiv.offscreen.storage.FileManager;
-
-/**
- * @author Pavel Fidransky [jsem@pavelfidransky.cz]
- */
-public class DownloadComponent extends HttpServlet {
-
-    private String crceApiBase;
-    private FileManager fileManager;
-
-    private Logger logger = Logger.getLogger(DownloadComponent.class);
-
-    /**
-     * Downloads component by its UUID set in query parameter. The component is then stored in the current graph version
-     * folder. As a response, JSON containing component's UUID and filename is returned.
-     */
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        logger.error("Method is no longer supported because CRCE is removed from project.");
-//        // there was no uuid passed in the request
-//        if (request.getParameter("uuid") == null) {
-//            response.sendError(response.SC_BAD_REQUEST);
-//            return;
-//        }
-//
-//        // initialize file manager
-//        String workingDirectory;
-//        if (request.getParameter("diagram_hash") == null) {
-//            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
-//        } else {
-//            workingDirectory = request.getParameter("diagram_hash");
-//        }
-//
-//        if (request.getParameter("graphVersion") != null) {
-//            workingDirectory += File.separator + request.getParameter("graphVersion");
-//        } else {
-//            workingDirectory += File.separator + SessionManager.getSessionValue(request, "graphVersion");
-//        }
-//
-//        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
-//
-//        fileManager = new FileManager(workingDirectory, storageLocation);
-//        if (!fileManager.isExistStorage()) {
-//            fileManager.createStorageDirectory();
-//        }
-//
-//        // download component
-//        crceApiBase = ConfigurationLoader.getCrceApiBase(request.getServletContext());
-//
-//        String uuid = request.getParameter("uuid");
-//        String name = downloadComponent(uuid);
-//
-//        JSONObject componentJson = new JSONObject();
-//        componentJson.put("uuid", uuid);
-//        componentJson.put("name", name);
-//
-//        // send response
-//        response.setContentType("application/json");
-//        response.getWriter().write(componentJson.toString());
-    }
-
-    /*
-    PRIVATE METHODS
-     */
-
-    private String downloadComponent(String uuid) throws IOException {
-        URL url = new URL(this.crceApiBase + "/resources/" + uuid);
-        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
-        connection.setConnectTimeout(60 * 1000);
-        connection.setReadTimeout(60 * 1000);
-
-        InputStream inputStream = connection.getInputStream();
-
-        String contentDisposition = connection.getHeaderField("Content-Disposition");
-        String fileName = contentDisposition.replaceFirst("(?i)^.*filename = ([^\"]+).*$", "$1");
-        File file = new File(fileName);
-
-        fileManager.saveFile(inputStream, file.getName());
-
-        inputStream.close();
-
-        return file.getName();
-    }
-
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/LoadLog.java b/sources/src/cz/zcu/kiv/offscreen/servlets/actions/LoadLog.java
deleted file mode 100644
index 8d04ba4..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/LoadLog.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets.actions;
-
-import cz.zcu.kiv.offscreen.user.DB;
-import cz.zcu.kiv.offscreen.user.Diagram;
-import cz.zcu.kiv.offscreen.user.Log;
-import cz.zcu.kiv.offscreen.user.User;
-import net.sf.json.JSONObject;
-import org.apache.log4j.Logger;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import net.sf.json.JSONArray;
-
-public class LoadLog extends HttpServlet {
-
-    private Logger logger = Logger.getLogger(LoadLog.class);
-    
-    /**
-     * Handles the HTTP
-     * <code>GET</code> method.
-     *
-     * @param request servlet request
-     * @param response servlet response
-     * @throws ServletException if a servlet-specific error occurs
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response)
-            throws ServletException, IOException {
-        throw new UnsupportedOperationException();
-    }
-    
-    /**
-     * Handles the HTTP
-     * <code>POST</code> method.
-     *
-     * @param request servlet request
-     * @param response servlet response
-     * @throws ServletException if a servlet-specific error occurs
-     * @throws IOException if an I/O error occurs
-     */
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response)
-            throws ServletException, IOException {
-        logger.info("Servlet - LoadLog \t\t method - doGet \t\t Start");
-        Object userIdStr = request.getSession().getAttribute("logged_user_id");
-        String diagramIDStr = request.getParameter("id_diagram");
-
-        response.setContentType("application/json");
-        PrintWriter out = response.getWriter();
-        if(diagramIDStr != null && userIdStr!=null) {
-                int diagramID = Integer.parseInt(diagramIDStr);
-                int userId = Integer.parseInt(userIdStr.toString());
-                DB dbConn = new DB(getServletContext());
-                String output = "";
-                Log log= new Log(dbConn);
-                List<Map<String,String>> listLogs = log.readLogs(diagramID);
-                JSONArray o = JSONArray.fromObject(listLogs);
-                output += o;
-                out.write(output);
-                logger.info("Servlet - LoadLog \t\t method - doGet \t\t return: " +o.toString());
-            }else {
-                logger.info("Servlet - LoadLog \t\t method - doGet \t\t diagramId or userId is null");
-            }
-        out.close();
-        logger.info("Servlet - LoadLog \t\t method - doGet \t\t end");
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/SaveLog.java b/sources/src/cz/zcu/kiv/offscreen/servlets/actions/SaveLog.java
deleted file mode 100644
index 69b1475..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/SaveLog.java
+++ /dev/null
@@ -1,146 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets.actions;
-
-import cz.zcu.kiv.offscreen.user.DB;
-import cz.zcu.kiv.offscreen.user.Diagram;
-import cz.zcu.kiv.offscreen.user.Log;
-import org.apache.log4j.Logger;
-
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.HashMap;
-
-/**
- * Class for save log
- * 
- * @author Marek Rasocha
- *
- */
-public class SaveLog extends HttpServlet{
-    private Logger logger = Logger.getLogger(SaveLog.class);
-  
-    
-    /**
-     * Method saves position of component, which are send by parameter in post method.
-     */
-    protected void doPost(HttpServletRequest request, HttpServletResponse response)
-            throws ServletException, IOException {
- logger.info("Servlet - SaveLog \t\t method - doPost \t\t start");
-        //id of diagram, which will be updated
-        String diagramIdStr  = request.getParameter("id_diagram");
-        Object userIdStr = request.getSession().getAttribute("logged_user_id");
-        DB db = new DB(getServletContext());
-        PrintWriter out = response.getWriter();
-        try{
-            if(diagramIdStr != null && userIdStr!=null) {
-                if (checkUserId(Integer.parseInt(diagramIdStr),Integer.parseInt(userIdStr.toString()),db)){
-                    HashMap<String, String> log = new HashMap<String, String>();
-                    log.put("user_name", request.getSession().getAttribute("logged_user_nick").toString());
-                    log.put("user_id", userIdStr.toString());
-                    log.put("id_diagram", diagramIdStr);
-                    String event = request.getParameter("log_event");
-                    log.put("log_event", event );
-                    log.put("log_date_delay", request.getParameter("log_date_delay"));
-                    log.put("change_jar", request.getParameter("change_jar"));
-                    log.put("new_version", request.getParameter("new_version"));
-                    if(event==null){
-                        out.write("{\"err\":\""+ "event is null" +"\"}");
-                    }else{
-                        Log logDao = new Log(db);
-                        if(logDao.createLog(log)>0){
-                            out.write("{\"ok\":\"ok\"}");
-                            logger.info("Servlet - SaveLog \t\t method - doPost \t\t Log created");
-                        }else{
-                            out.write("{\"err\":\""+ "database error " +"\"}");
-                            logger.info("Servlet - SaveLog \t\t method - doPost \t\t error database");
-                        }
-                        
-                    }
-                    
-                }else{
-                    logger.info("Servlet - SaveLog \t\t method - doPost \t\t This user dont have a permisson");
-                    out.write("{\"err\":\""+ "This user has not permission for showing the log " +"\"}");
-                }
-            }else{
-                logger.info("Servlet - SaveLog \t\t method - doPost \t\t diagramId or userId is null");
-                out.write("{\"err\":\""+ "diagramId or userId is null" +"\"}");
-            }
-
-        	
-        }catch(NumberFormatException e){
-        	e.printStackTrace();
-        }catch(Exception e){
-        	e.printStackTrace();
-        }
-        out.close();
-        logger.info("Servlet - SaveLog \t\t method - doPost \t\t end");
-    }
-
-    private boolean checkUserId(int diagramID, int userId, DB db) {
-
-        Diagram diag = new Diagram(db);
-        HashMap<String,String> param = (HashMap<String, String>) diag.getDiagramParam(diagramID);
-        String idStr = param.get("user_id");
-        int id = Integer.parseInt(idStr);
-        if (userId==0){
-            return false;
-        }
-        return  id==userId ? true : false;
-    }
-    protected void doGet(HttpServletRequest request, HttpServletResponse response)
-            throws ServletException, IOException {
-        logger.info("Servlet - SaveLog \t\t method - doPost \t\t start");
-        //id of diagram, which will be updated
-        String diagramIdStr  = request.getParameter("id_diagram");
-        Object userIdStr = request.getSession().getAttribute("logged_user_id");
-        DB db = new DB(getServletContext());
-        PrintWriter out = response.getWriter();
-        try{
-            if(diagramIdStr != null && userIdStr!=null) {
-                if (checkUserId(Integer.parseInt(diagramIdStr),Integer.parseInt(userIdStr.toString()),db)){
-                    HashMap<String, String> log = new HashMap<String, String>();
-                    log.put("user_name", request.getSession().getAttribute("logged_user_nick").toString());
-                    log.put("user_id", userIdStr.toString());
-                    log.put("id_diagram", diagramIdStr);
-                    String event = request.getParameter("log_event");
-                    log.put("log_event", event );
-                    log.put("log_date_delay", request.getParameter("log_date_delay"));
-                    log.put("change_jar", request.getParameter("change_jar"));
-                    log.put("new_version", request.getParameter("new_version"));
-                    if(event==null){
-                        out.write("{\"err\":\""+ "event is null" +"\"}");
-                    }else{
-                        Log logDao = new Log(db);
-                        if(logDao.createLog(log)>0){
-                            out.write("{\"ok\":\"ok\"}");
-                            logger.info("Servlet - SaveLog \t\t method - doPost \t\t Log created");
-                        }else{
-                            out.write("{\"err\":\""+ "database error " +"\"}");
-                            logger.info("Servlet - SaveLog \t\t method - doPost \t\t error database");
-                        }
-                        
-                    }
-                    
-                }else{
-                    logger.info("Servlet - SaveLog \t\t method - doPost \t\t This user dont have a permisson");
-                    out.write("{\"err\":\""+ "This user has not permission for showing the log " +"\"}");
-                }
-            }else{
-                logger.info("Servlet - SaveLog \t\t method - doPost \t\t diagramId or userId is null");
-                out.write("{\"err\":\""+ "diagramId or userId is null" +"\"}");
-            }
-
-        	
-        }catch(NumberFormatException e){
-        	e.printStackTrace();
-        }catch(Exception e){
-        	e.printStackTrace();
-        }
-        out.close();
-        logger.info("Servlet - SaveLog \t\t method - doPost \t\t end");
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/UploadFiles.java b/sources/src/cz/zcu/kiv/offscreen/servlets/actions/UploadFiles.java
deleted file mode 100644
index 784afc2..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/servlets/actions/UploadFiles.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package cz.zcu.kiv.offscreen.servlets.actions;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
-
-import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
-import cz.zcu.kiv.offscreen.session.SessionManager;
-import cz.zcu.kiv.offscreen.storage.FileManager;
-import cz.zcu.kiv.offscreen.user.DB;
-import cz.zcu.kiv.offscreen.user.Diagram;
-
-/**
- *
- * @author Jindra PavlĂ­kovĂˇ <jindra.pav2@seznam.cz>
- */
-public class UploadFiles extends HttpServlet {
-
-    @Override
-    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        doPost(request, response);
-    }
-
-    @Override
-    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
-        DB db = new DB(getServletContext());
-
-        String diagram_id = request.getParameter("diagram_id");
-        if (diagram_id != null) {
-            Integer diagramId = Integer.parseInt(diagram_id);
-
-	        Diagram diagram_edit = new Diagram(db, diagramId);
-	        Map<String, String> diag_param = diagram_edit.getDiagramParam(diagramId);
-	        
-	        request.setAttribute("diagram_name", diag_param.get("name"));
-	        request.setAttribute("diagram_user_id", diag_param.get("user_id"));
-	        request.setAttribute("diagram_public_checked", (diag_param.get("public").compareTo("1") == 0 ? " checked=\"checked\" " : ""));
-        } else {
-        	request.setAttribute("diagram_name", "");
-        	request.setAttribute("diagram_public_checked", "");
-        	request.setAttribute("diagram_user_id", "-1");
-        }
-
-        // initialize file manager
-        String workingDirectory;
-        if (request.getParameter("diagram_hash") == null) {
-            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
-        } else {
-            workingDirectory = request.getParameter("diagram_hash");
-        }
-
-        int version = 1;
-        workingDirectory += File.separator + String.valueOf(version);
-
-        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
-
-        FileManager fileManager = new FileManager(workingDirectory, storageLocation);
-        if (!fileManager.isExistStorage()) {
-            fileManager.createStorageDirectory();
-        }
-
-        // save files from request
-        String result;
-        if (ServletFileUpload.isMultipartContent(request)) {
-            result = fileManager.saveFile(request);
-        } else {
-            result = "";
-        }
-
-        response.addCookie(new Cookie("graphVersion", String.valueOf(version)));
-
-        // response
-        ArrayList<Map<String, String>> list = new ArrayList<>();
-        if (request.getSession().getAttribute("logged_user") == "1") {
-            int loggedUserId = (int) request.getSession().getAttribute("logged_user_id");
-
-			list = new Diagram(db).getDiagramListByUserId(loggedUserId);
-        }
-        request.setAttribute("diagramNames", list);
-
-        request.setAttribute("diagramPublic", new Diagram(db).getDiagramPublicList());
-        
-        request.setAttribute("componentNames", fileManager.getUploadedComponentsNames());
-        request.setAttribute("errorMessage", result);
-
-        // render
-        RequestDispatcher rd = getServletContext().getRequestDispatcher("/uploadFiles.jsp");
-        rd.forward(request, response);
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/session/SessionManager.java b/sources/src/cz/zcu/kiv/offscreen/session/SessionManager.java
deleted file mode 100644
index f6b963f..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/session/SessionManager.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package cz.zcu.kiv.offscreen.session;
-
-import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
-import cz.zcu.kiv.offscreen.storage.FileManager;
-import java.io.IOException;
-import java.util.logging.Level;
-import javax.servlet.http.*;
-import org.apache.log4j.Logger;
-
-/**
- *
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class SessionManager implements HttpSessionListener {
-
-    private static Logger logger = Logger.getLogger(SessionManager.class);
-
-    /**
-     * Get session value.
-     * @param request request
-     * @param sessionName session name
-     * @return Returns value which correspond sessionName
-     */
-    public static String getSessionValue(HttpServletRequest request, String sessionName) {
-        logger.trace("ENTRY");
-        logger.debug("*" + request.getCookies() + "*");
-        Cookie[] cookie = null;
-        String sessionValue = "";
-
-        if (request.getCookies() != null) {
-            cookie = request.getCookies();
-            logger.debug(cookie.length);
-            for (int i = 0; i < cookie.length; i++) {
-                logger.debug(cookie[i]);
-                if ((cookie[i].getName()).equals(sessionName)) {
-                    sessionValue = cookie[i].getValue();
-                }
-            }
-        }
-        logger.trace("EXIT");
-        return sessionValue;
-    }
-
-    @Override
-    public void sessionCreated(HttpSessionEvent se) {
-        logger.trace("ENTRY");
-        HttpSession session = se.getSession();
-        logger.info("Session " + session.getId()
-                + " was created with timeout " + session.getMaxInactiveInterval());
-        logger.trace("EXIT");
-    }
-
-    @Override
-    public void sessionDestroyed(HttpSessionEvent se) {
-        try {
-            logger.trace("ENTRY");
-            HttpSession session = se.getSession();
-            logger.info("Session " + session.getId() + " was invalidated.");
-
-            String storageLocation = ConfigurationLoader.getStorageLocation(session.getServletContext());
-            FileManager storage = new FileManager(session.getId(), storageLocation);
-            try {
-                storage.deleteDirectory();
-            } catch (IOException ex) {
-                logger.error("Directory " + session.getId() + " was not deleted. " + ex.getMessage());
-            }
-            logger.trace("EXIT");
-        } catch (IOException ex) {
-            java.util.logging.Logger.getLogger(SessionManager.class.getName()).log(Level.SEVERE, null, ex);
-        }
-
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/storage/FileManager.java b/sources/src/cz/zcu/kiv/offscreen/storage/FileManager.java
deleted file mode 100644
index bae9042..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/storage/FileManager.java
+++ /dev/null
@@ -1,319 +0,0 @@
-package cz.zcu.kiv.offscreen.storage;
-
-import java.io.*;
-import java.net.URI;
-import java.util.LinkedList;
-import java.util.List;
-import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.fileupload.disk.DiskFileItemFactory;
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.apache.commons.io.FileDeleteStrategy;
-import org.apache.commons.io.FileUtils;
-import org.apache.log4j.Logger;
-
-/**
- *
- * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
- */
-public class FileManager {
-
-    private int MAX_FILE_SIZE = 512000000;
-    private int MAX_MEM_SIZE = 4 * 1024;
-    private static final String ACCEPTED_EXTENSION_FILE = "json";
-    private String storagePath;
-    private Logger logger = Logger.getLogger(FileManager.class);
-
-    public FileManager(String directoryName, String storageLocation) {
-        logger.trace("ENTRY");
-        this.storagePath = storageLocation + File.separator + directoryName;
-        logger.trace("EXIT");
-    }
-
-    public void createStorageDirectory() throws IOException {
-        logger.trace("ENTRY");
-        File storageDirectory = new File(this.storagePath);
-        FileUtils.forceMkdir(storageDirectory);
-        logger.trace("EXIT");
-    }
-
-    public boolean isExistStorage() {
-        logger.trace("ENTRY");
-        logger.trace("EXIT");
-        return new File(this.storagePath).isDirectory();
-    }
-
-    private boolean isAcceptedExtension(String componentName) {
-        return componentName.endsWith("." + ACCEPTED_EXTENSION_FILE);
-    }
-
-    public String saveFile(HttpServletRequest request) {
-        logger.trace("ENTRY");
-
-        boolean firstErr = true;
-        StringBuilder sb = new StringBuilder();
-        DiskFileItemFactory factory = new DiskFileItemFactory();
-        factory.setSizeThreshold(MAX_MEM_SIZE);
-        factory.setRepository(new File(this.storagePath));
-
-        ServletFileUpload upload = new ServletFileUpload(factory);
-        upload.setSizeMax(MAX_FILE_SIZE);
-
-        try {
-            // Parse the request to get file items.
-            List<FileItem> fileItems = upload.parseRequest(request);
-            File file;
-            for (FileItem fileItem : fileItems) {
-                if (isAcceptedExtension(fileItem.getName()) && fileItem.getSize() > 0) {
-                    logger.debug(fileItem.getName() + " - " + fileItem.getContentType());
-                    file = new File(this.storagePath + File.separator + fileItem.getName());
-                    fileItem.write(file);
-
-                } else if (fileItem.getSize() <= 0) {
-                	if (firstErr) {
-                        sb.append("<strong>Unsupported files:</strong><br/>");
-                        firstErr = false;
-                    }
-                	
-                	sb.append("&nbsp;&nbsp;&nbsp;File ");
-                    sb.append(fileItem.getName());
-                    sb.append(" was't uploaded. (File size is 0 B)<br/>");
-                	
-                } else {
-                    if (firstErr) {
-                        sb.append("<strong>Unsupported files:</strong><br/>");
-                        firstErr = false;
-                    }
-                    sb.append("&nbsp;&nbsp;&nbsp;File ");
-                    sb.append(fileItem.getName());
-                    sb.append(" was't uploaded.<br/>");
-                }
-            }
-
-        } catch (Exception ex) {
-            System.out.println(ex);
-        }
-
-        logger.trace("EXIT");
-        return sb.toString();
-    }
-
-    public void saveFile(InputStream inputStream, String fileName) throws IOException {
-        File file = new File(this.storagePath + File.separator + fileName);
-
-        if (isAcceptedExtension(file.getName())) {
-            BufferedInputStream in = new BufferedInputStream(inputStream);
-            FileOutputStream out = new FileOutputStream(file);
-
-            int length;
-            byte[] buffer = new byte[1024];
-
-            while ((length = in.read(buffer)) > -1) {
-                out.write(buffer, 0, length);
-            }
-
-            in.close();
-            out.close();
-        }
-    }
-
-    /**
-     * Gets list of uploded components file names in designated directory for
-     * current session.
-     *
-     * @return list of filenames
-     */
-    public List<String> getUploadedComponentsNames() {
-        logger.trace("ENTRY");
-        String[] extension = {ACCEPTED_EXTENSION_FILE};
-        logger.info(this.storagePath);
-
-        LinkedList<File> fileNames = (LinkedList<File>) FileUtils.listFiles(new File(this.storagePath), extension, false);
-        List<String> bundleNames = new LinkedList<String>();
-        for (File file : fileNames) {
-            bundleNames.add(file.getName());
-        }
-
-        logger.trace("EXIT");
-        return bundleNames;
-    }
-
-    /**
-     * Deletes file from storage.
-     *
-     * @param fileName
-     */
-    public void deleteFile(String fileName) {
-        logger.trace("ENTRY");
-        if (fileName == null) {
-            throw new NullPointerException("The parameter fileName is null!");
-        }
-        String path = this.storagePath + File.separator + fileName;
-        logger.debug("All path to delete file: " + path);
-        File filePath = new File(path);
-
-        if (filePath.isDirectory()) {
-            throw new IllegalArgumentException("The parameter fileName " + fileName + " can not be directory!");
-        }
-
-        if (!FileDeleteStrategy.NORMAL.deleteQuietly(filePath)) {
-            throw new IllegalStateException("The file " + fileName + " can not be deleted!");
-        }
-        logger.debug("File " + fileName + " was deleted.");
-
-        logger.trace("EXIT");
-    }
-
-    /**
-     * Deletes all files from storage.
-     *
-     * @throws IOException
-     */
-    public void deleteAllFiles() throws IOException {
-        logger.trace("ENTRY");
-
-        File dir = new File(this.storagePath);
-        if (dir.exists()){
-        	FileUtils.cleanDirectory(dir);
-        }
-
-        logger.trace("EXIT");
-    }
-
-    /**
-     * Convert file to URI.
-     * @return Return list of URI.
-     */
-    public URI[] convertFileToURI() {
-        List<File> files = this.getUploadedComponents();
-        logger.trace("ENTRY");
-        if (files == null) {
-            throw new IllegalArgumentException("Parameter List<File> files is null.");
-        }
-
-        URI[] filesURI = new URI[files.size()];
-        int i = 0;
-        for (File file : files) {
-            filesURI[i] = file.toURI();
-            i++;
-        }
-
-        logger.trace("EXIT");
-        return filesURI;
-    }
-
-    /**
-     * Gets list of absolute path uploaded components in designated directory
-     * for current session.
-     *
-     * @return list of absolute path uploaded bundles
-     */
-    public List<File> getUploadedComponents() {
-        logger.trace("ENTRY");
-        String[] extension = {ACCEPTED_EXTENSION_FILE};
-        logger.info(this.storagePath);
-        LinkedList<File> fileNames = (LinkedList<File>) FileUtils.listFiles(
-                new File(this.storagePath), extension, false);
-        logger.trace("EXIT");
-        return fileNames;
-    }
-    
-    /**
-     * Gets list of absolute path uploaded components in designated directory
-     * for current session.
-     *
-     * @return list of absolute path uploaded bundles
-     */
-    public List<File> copyUploadedComponents(String directory_name) {
-        logger.trace("ENTRY");
-
-        String[] extension = {ACCEPTED_EXTENSION_FILE};
-        logger.info(this.storagePath);
-        LinkedList<File> fileNames = (LinkedList<File>) FileUtils.listFiles(
-                new File(this.storagePath), extension, false);
-        List<String> bundleNames = new LinkedList<String>();
-        for (File file : fileNames) {
-        	
-        	File f2 = new File(directory_name + File.separator + file.getName());
-        	InputStream in;
-			try {
-					in = new FileInputStream(file);
-				
-	        	OutputStream out = new FileOutputStream(f2);
-	        	
-	        	byte[] buf = new byte[1024];
-	            int len;
-	            while ((len = in.read(buf)) > 0){
-	            out.write(buf, 0, len);
-	            }
-	            in.close();
-	            out.close();
-            
-			} catch (IOException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-        }
-        
-        logger.trace("EXIT");
-        return fileNames;
-    }
-    
-    
-    /**
-     *
-     *
-     * @return list of absolute path uploaded bundles
-     */
-    public List<File> copyUploadedComponentsTo(String directory_name) {
-        logger.trace("ENTRY");
-
-        String[] extension = {ACCEPTED_EXTENSION_FILE};
-        logger.info(this.storagePath);
-
-        LinkedList<File> fileNames = (LinkedList<File>) FileUtils.listFiles(new File(this.storagePath), extension, false);
-        List<String> bundleNames = new LinkedList<String>();
-        for (File file : fileNames) {
-        	File f2 = new File(directory_name + File.separator + file.getName());
-        	InputStream in;
-
-			try {
-                in = new FileInputStream(file);
-	        	OutputStream out = new FileOutputStream(f2);
-	        	
-	        	byte[] buf = new byte[1024];
-	            int len;
-	            while ((len = in.read(buf)) > 0){
-	                out.write(buf, 0, len);
-	            }
-
-	            in.close();
-	            out.close();
-            
-			} catch (IOException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-        }
-        
-        logger.trace("EXIT");
-        return fileNames;
-    }
-    
-    /**
-     *  Deletes a directory recursively from storage.
-     *
-     * @throws IOException in case deletion is unsuccessful
-     */
-    public void deleteDirectory() throws IOException {
-        logger.trace("ENTRY");
-
-        File dir = new File(this.storagePath);
-        if (dir.exists()) {
-        	FileUtils.deleteDirectory(dir);
-        }
-
-        logger.trace("EXIT");
-    }
-    
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/user/DB.java b/sources/src/cz/zcu/kiv/offscreen/user/DB.java
deleted file mode 100644
index b7ce83c..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/user/DB.java
+++ /dev/null
@@ -1,107 +0,0 @@
-package cz.zcu.kiv.offscreen.user;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-
-import javax.servlet.ServletContext;
-
-/**
- * Class Db is useful for comunication with mysql database.
- * 
- * @author Daniel Bureš
- *
- */
-
-public class DB {
-	private Connection conn = null;
-	
-	/**
-	 * Constructor opens connection do database. Access data must be save in ServletContext as InitParameter( DbUrl, DbName, DbUser, DbPsw ).
-	 * 
-	 * 
-	 */
-	public DB(ServletContext context){	
-		    
-			try {
-				Class.forName("com.mysql.jdbc.Driver");
-				
-				conn = (Connection) DriverManager.getConnection(context.getInitParameter("DbUrl") + context.getInitParameter("DbName")+"?user="+ context.getInitParameter("DbUser") +"&password="+ context.getInitParameter("DbPsw") + "&useUnicode=true&characterEncoding=UTF-8");				
-				open();
-			} catch (ClassNotFoundException e) {
-				System.out.println("classnotfound exception");
-				e.printStackTrace();
-			} catch (SQLException e) {
-				
-				System.out.println("sql exception");
-				e.printStackTrace();
-			}
-	}
-	
-	/**
-	 * Method creates sql tables in database. And insert users: admin, user1, user2, user3
-	 */
-	public void open() throws SQLException{
-		//conn = (Connection) DriverManager.getConnection(serverName +"?user="+ userName +"&password="+ password + "&useUnicode=true&characterEncoding=UTF-8");
-		conn.setAutoCommit(true);
-		Statement stat = conn.createStatement();
-						
-	}
-	
-	/**
-	 * Method returns actual connection to database.
-	 * 
-	 * @return actual connection to database.
-	 */
-	public Connection getConn(){
-		return conn;		
-	}
-	
-	/**
-	 * Method execute sql query. Sql query can be INSERT, DELETE, UPDATE
-	 * @return count of affected rows
-	 * */
-	public int exStatement(String sql) {	
-		Statement stat;
-		
-		try{
-			stat = conn.createStatement();
-			return stat.executeUpdate(sql);
-		}catch(SQLException e){
-			e.printStackTrace();
-			return -1;
-		}catch (NullPointerException e){
-			e.printStackTrace();
-			return -2;
-		}	
-		
-	}
-	
-	/**
-	 * Method execute sql query like SELECT and returns affected rows as resultSet or Null. 
-	 * 
-	 * @throws SQLException 
-	 * @return ResultSet - data from database 
-	 */
-	public ResultSet exQuery(String sql){
-		Statement stat;
-		
-		try{
-			stat = conn.createStatement();
-			stat.execute(sql);
-			return stat.getResultSet();
-		}catch(SQLException e){
-			e.printStackTrace();
-			return null;
-		}catch (NullPointerException e){
-			e.printStackTrace();
-			return null;
-		}			 
-		
-		
-	}
-
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/user/Diagram.java b/sources/src/cz/zcu/kiv/offscreen/user/Diagram.java
deleted file mode 100644
index 4bbe053..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/user/Diagram.java
+++ /dev/null
@@ -1,251 +0,0 @@
-package cz.zcu.kiv.offscreen.user;
-
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import javax.servlet.ServletContext;
-
-/**
- * Class is usefull for saving and loading diagram params from database.
- * 
- * @author Daniel Bureš
- *
- */
-public class Diagram {
-	private DB db = null;
-	private int id = 0;
-	private ResultSet rs;
-	 
-	
-	public Diagram(DB db) {			
-		this(db,0);
-	}
-	
-	
-	public Diagram(DB db,int id) {
-		this.db = db;	
-		this.id = id;
-	}
-	
-	/**
-	 * Method returns object id.
-	 * 
-	 * @return id
-	 */
-	public int getId(){
-		return this.id;
-	}
-	
-	/**
-	 * Method returns id of object as string.
-	 * 
-	 * @return
-	 */
-	public String getIdStr(){
-		return Integer.toString(this.id);		
-	}
-	
-	/**
-	 * Method saves new diagram into database.
-	 * 
-	 * @param param - diagram parameters
-	 */
-	public void update(Map<String, String> param){
-		try {
-			if ( this.id  == 0 ) {
-				  
-				    String diagram_name = param.get("diagram_name")  ;
-				    String hash = param.get("hash")  ;  
-				    String component_count = param.get("component_count")  ;
-				    String user_id = param.get("user_id")  ;
-				    String public_diag = param.get("public")  ;
-				
-					String qy = "INSERT INTO diagram (id, created, user_id,component_count, name, session_id, hash,public ) " +
-										"VALUES ('0', NOW(), '"+user_id+"', '"+component_count+"', '"+diagram_name+"', '', '" + hash + "' , '" + public_diag + "' ) ";
-					Statement st = db.getConn().createStatement();
-					st.executeUpdate(qy, Statement.RETURN_GENERATED_KEYS);
-					ResultSet rs = st.getGeneratedKeys();
-					
-					if(rs.next()){							
-						this.id = rs.getInt(1);						
-					}					
-					
-				
-			}else{
-				    String diagram_name = param.get("diagram_name")  ;
-				    String component_count = param.get("component_count")  ;
-				    String public_diag = param.get("public")  ;  
-				
-					String qy = "UPDATE diagram SET component_count = '" + component_count + "', name = '"+diagram_name+"', public = '"+public_diag+"' " + 
-										" WHERE id= '" + this.id + "'";
-					Statement st = db.getConn().createStatement();
-					st.executeUpdate(qy, Statement.RETURN_GENERATED_KEYS);
-					ResultSet rs = st.getGeneratedKeys();
-
-			}
-					  
-			
-		
-		} catch (SQLException e) {
-			e.printStackTrace();
-		}		
-	}
-	
-	/**
-	 * Method deletes diagram from database.
-	 */
-	public void delete(){
-		String qy = "DELETE FROM diagram WHERE id = '"+ this.id+"' LIMIT 1";
-		
-		db.exStatement(qy);
-						
-		
-	}
-	
-	/*
-	public void updateViewport(String viewport_html){
-		String qy = "UPDATE diagram SET viewport_html = '"+ viewport_html+"' WHERE id = '"+ this.id+"' LIMIT 1";
-		try {
-			db.exStatement(qy);
-						
-		} catch (SQLException e) {
-			
-			e.printStackTrace();
-		}
-	}
-
-	public void updateRightpanel(String rightpanel_html){
-		String qy = "UPDATE diagram SET rightpanel_html = '"+ rightpanel_html+"' WHERE id = '"+ this.id+"' LIMIT 1";
-		try {
-			db.exStatement(qy);
-						
-		} catch (SQLException e) {
-			
-			e.printStackTrace();
-		}
-	}*/
-	
-	/**
-	 * Method updates vertices position in database. Position of vertices are saved in json.
-	 * 
-	 * @param vertices_position_json
-	 */
-	public void updateVerticesPosition(String vertices_position_json){
-		String qy = "UPDATE diagram SET vertices_position = '"+ vertices_position_json+"' WHERE id = '"+ this.id+"' LIMIT 1";
-		
-			db.exStatement(qy);
-						
-		
-	}
-	
-	/**
-	 * Method returns parameters of diagram.
-	 * @param diagram_id
-	 * @return
-	 */
-	public Map<String,String> getDiagramParam(int diagram_id){
-		HashMap<String, String> item_map = new HashMap<String, String>();
-		String qy = "SELECT * FROM diagram WHERE id = '"+diagram_id+"' ORDER BY created DESC ";
-		try {
-			rs = db.exQuery(qy);			
-			while ( rs != null && rs.next() ) {
-				
-				
-				item_map.put("id", String.valueOf(rs.getInt("id")) );
-				item_map.put("name", rs.getString("name")  );
-				item_map.put("hash", rs.getString("hash")  );
-				item_map.put("public", String.valueOf(rs.getInt("public")) );
-				item_map.put("user_id", String.valueOf(rs.getInt("user_id")) );
-				item_map.put("vertices_position", rs.getString("vertices_position")  );
-				item_map.put("component_count", String.valueOf(rs.getInt("component_count")) );
-				item_map.put("created", Util.formatDate(rs.getString("created") ) );
-				item_map.put("session_id", rs.getString("session_id") );
-				
-				
-			}
-			
-		} catch (SQLException e) {
-			
-			e.printStackTrace();
-		}
-		
-		return item_map;
-		
-	}
-	
-	/**
-	 * Method returns list of digrams, which are uploaded by user.
-	 * 
-	 * @param user_id
-	 * @return
-	 */
-	public ArrayList<Map<String,String>> getDiagramListByUserId(int user_id){		
-		ArrayList<Map<String,String>> diagram_list = new ArrayList<Map<String,String>>();
-		String qy = "SELECT * FROM diagram WHERE user_id = '"+user_id+"' ORDER BY created DESC ";
-		try {
-			rs = db.exQuery(qy);			
-			while ( rs != null && rs.next() ) {
-				HashMap<String, String> item_map = new HashMap<String, String>();
-				
-				item_map.put("id", String.valueOf(rs.getInt("id")) );
-				item_map.put("name", (rs.getString("name").length()==0?"No name":rs.getString("name"))  );
-				item_map.put("public", String.valueOf(rs.getInt("public")) );
-				item_map.put("component_count", String.valueOf(rs.getInt("component_count")) );
-				item_map.put("hash", rs.getString("hash")  );
-				item_map.put("created", Util.formatDate(rs.getString("created") ) );
-				item_map.put("session_id", rs.getString("session_id") );
-				
-				diagram_list.add(item_map);
-			}
-			
-		} catch (SQLException e) {
-			
-			e.printStackTrace();
-		}
-		
-		return diagram_list;
-		
-	}
-	
-	
-	/**
-	 * Method returns list of public diagrams.
-	 * @return
-	 */
-	public ArrayList<Map<String,String>> getDiagramPublicList(){
-		
-		ArrayList<Map<String,String>> diagram_list = new ArrayList<Map<String,String>>();
-		String qy = "SELECT * FROM diagram WHERE public = 1 ORDER BY name ASC ";
-		try {
-			rs = db.exQuery(qy);			
-			while ( rs != null && rs.next() ) {
-				HashMap<String, String> item_map = new HashMap<String, String>();
-				
-				item_map.put("id", String.valueOf(rs.getInt("id")) );
-				item_map.put("name", (rs.getString("name").length()==0?"No name":rs.getString("name"))  );
-				item_map.put("public", String.valueOf(rs.getInt("public")) );
-				item_map.put("component_count", String.valueOf(rs.getInt("component_count")) );
-				item_map.put("hash", rs.getString("hash")  );
-				item_map.put("created", Util.formatDate(rs.getString("created") ) );
-				item_map.put("session_id", rs.getString("session_id") );
-				
-				diagram_list.add(item_map);
-			}
-			
-		} catch (SQLException e) {
-			
-			e.printStackTrace();
-		}
-		
-		return diagram_list;
-		
-	}
-	
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/user/Log.java b/sources/src/cz/zcu/kiv/offscreen/user/Log.java
deleted file mode 100644
index 73c92a0..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/user/Log.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package cz.zcu.kiv.offscreen.user;
-
-import com.mysql.jdbc.PreparedStatement;
-import java.sql.Connection;
-import java.sql.Date;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.servlet.ServletContext;
-
-/**
- * Class is usefull for saving and loading diagram params from database.
- *
- * @author Daniel Bureš
- *
- */
-public class Log {
-    private DB db = null;
-    private int id = 0;
-    private ResultSet rs;
-
-
-    public Log(DB db) {
-        this(db, 0);
-    }
-
-
-    public Log(DB db, int id) {
-        this.db = db;
-        this.id = id;
-    }
-
-    /**
-     * Method returns object id.
-     *
-     * @return id
-     */
-    public int getId() {
-        return this.id;
-    }
-
-    /**
-     * Method returns id of object as string.
-     *
-     * @return
-     */
-    public String getIdStr() {
-        return Integer.toString(this.id);
-    }
-
-
-    public int createLog(Map<String, String> param) {
-        String idUser = param.get("user_id");
-        String idDiagram = param.get("id_diagram");
-        String event = param.get("log_event");
-        String delay = param.get("log_date_delay");
-        String jar = param.get("change_jar");
-        String userName = param.get("user_name");
-        String newVersion = param.get("new_version");
-        Connection con = db.getConn();
-        PreparedStatement pstmt;
-        try {
-            pstmt = (PreparedStatement) con.prepareStatement("INSERT INTO log(id_user,user_name,id_diagram,event,date,date_delay,change_jar,new_version) VALUES "+
-                    "(?,?,?,?,?,?,?,?)");
-            pstmt.setInt(1,Integer.parseInt(idUser));
-            pstmt.setString(2,userName);
-            pstmt.setInt(3,Integer.parseInt(idDiagram));
-            pstmt.setString(4,event);
-            Date date2 = new Date(System.currentTimeMillis());
-            pstmt.setDate(5,date2);
-            Date date=null;
-            if(delay!=null){
-               date = new Date(Integer.parseInt(delay));
-            }
-            pstmt.setDate(6,date);
-            pstmt.setString(7,jar);
-            pstmt.setString(8,newVersion);
-            return pstmt.executeUpdate();
-        } catch (SQLException ex) {
-            Logger.getLogger(Log.class.getName()).log(Level.SEVERE, null, ex);
-            return -1;
-        }
-
-            
-//        return db.exStatement(qy);
-    }
-    public List<Map<String,String>> readLogs(int idDiagram){
-        List<Map<String,String>> diagram_list = new ArrayList<Map<String,String>>();
-        String qy = "SELECT * FROM log WHERE id_diagram = '"+idDiagram+"' ORDER BY date ASC ";
-        try {
-            rs = db.exQuery(qy);
-            while ( rs != null && rs.next() ) {
-                HashMap<String, String> item_map = new HashMap<String, String>();
-                item_map.put("id", String.valueOf(rs.getInt("id")));
-                item_map.put("user_id", String.valueOf(rs.getInt("id_user")));
-                item_map.put("user_name", String.valueOf(rs.getString("user_name")) );
-                item_map.put("diagram_id", String.valueOf(rs.getInt("id_diagram")) );
-                item_map.put("log_date", Util.formatDate(rs.getString("date")) );
-                item_map.put("log_event", String.valueOf(rs.getString("event")) );
-                String str = String.valueOf(rs.getString("date_delay"));
-                if(str!=null) str = Util.formatDate(str);
-                item_map.put("log_date_delay", str);
-                item_map.put("change_jar", rs.getString("change_jar"));
-                item_map.put("new_version", String.valueOf(rs.getString("new_version") ) );
-                diagram_list.add(item_map);
-            }
-
-        } catch (SQLException e) {
-
-            e.printStackTrace();
-        }
-
-        return diagram_list;
-
-    }
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/user/User.java b/sources/src/cz/zcu/kiv/offscreen/user/User.java
deleted file mode 100644
index 82eba01..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/user/User.java
+++ /dev/null
@@ -1,267 +0,0 @@
-package cz.zcu.kiv.offscreen.user;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.ServletContext;
-
-/**
- * Class CUser is used for creating, updating or loading user from database.
- *
- * @author Daniel Bureš
- *
- */
-public class User {
-	private DB db = null;
-	private int id = 0;
-	private ResultSet rs;
-	private Map<String,String> paramStr = new HashMap<String,String>(10);
-
-
-	/**
-	 * Constructs object, where is saved db connection.
-	 */
-	public User(DB db) {
-		this(db,0);
-	}
-
-	/**
-	 * Constructs object, where is saved db connection and user id. User, who has this id is loaded from database.
-	 */
-	public User(DB db, int id){
-		this.db = db;
-		this.id = id;
-
-		if(id > 0){
-			load();
-		}
-
-	}
-
-	/**
-	 * Method loads user from database. User is loaded by his id, which must be saved in object of this class.
-	 */
-	public void load(){
-		String qy = "SELECT * FROM user WHERE id = '"+this.id+"' ";
-		try {
-			rs = db.exQuery(qy);
-			if ( rs != null && rs.next() ) {
-				this.id = rs.getInt("id");
-
-
-				paramStr.put("nick", rs.getString("nick")  );
-
-			}else{
-				this.id = 0;
-			}
-
-		} catch (SQLException e) {
-			e.printStackTrace();
-		}
-
-	}
-
-
-	/**
-	 * Method sets session for current user and save session to database.
-	 *
-	 * @param session
-	 */
-	public void setSession(String session){
-		if(id > 0){
-			String qy = "UPDATE user SET session='"+session+"' WHERE id='"+ this.id +"'";
-			db.exStatement(qy);
-		}
-	}
-
-	/**
-	 * Method try to login user by his nick name and password. If login is OK then returns true else  returns false;
-	 *
-	 * @param nick
-	 * @param psw
-	 * @return true - login ok
-	 * 		   false - login failed
-	 */
-	public boolean login(String nick, String psw){
-		String qy = "SELECT * FROM user WHERE nick LIKE '"+nick+"' AND psw LIKE '"+Util.MD5(psw)+"' AND active = '1' LIMIT 1";
-		try {
-			rs = db.exQuery(qy);
-			if ( rs.next() ) {
-				if(rs.getInt("id") > 0){
-					this.id = rs.getInt("id");
-					load();
-					return true;
-				}
-			}
-		} catch (SQLException e) {
-			e.printStackTrace();
-		}
-
-
-		return false;
-	}
-
-
-
-	public void register(Map<String, String> param){
-		try {
-				if ( this.id  == 0 ) {
-
-					String qy = "INSERT INTO user (id,created,active, nick,name, psw,session,email) " +
-										"VALUES (	'0', " +
-										"			NOW(), " +
-										"			'1', " +
-										"			'" + param.get("nick") + "',"+
-										"			'" + param.get("name") + "',"+
-										"			'" + Util.MD5(param.get("password")) + "'," +
-										" 			'" + param.get("session") + "',"+
-										" 			'" + param.get("email") + "' ) ";
-					Statement st = db.getConn().createStatement();
-					st.executeUpdate(qy, Statement.RETURN_GENERATED_KEYS);
-					ResultSet rs = st.getGeneratedKeys();
-
-					if(rs.next()){
-						this.id = rs.getInt(1);
-					}
-				}
-
-			} catch (SQLException e) {
-				e.printStackTrace();
-			}
-
-	}
-
-	/**
-	 * Method saves parameters into database. if is not loaded user then is created new User.
-	 *
-	 * @param param - parameters to save
-	 * @param cx
-	 */
-	public void update(Map<String, String> param,ServletContext cx){
-		try {
-			if ( this.id  == 0 ) {
-
-					String qy = "INSERT INTO user (id,created,active) " +
-										"VALUES ('0', NOW(), '1' ) ";
-					Statement st = db.getConn().createStatement();
-					st.executeUpdate(qy, Statement.RETURN_GENERATED_KEYS);
-					ResultSet rs = st.getGeneratedKeys();
-
-					if(rs.next()){
-						this.id = rs.getInt(1);
-					}
-
-
-			}
-
-			String tmp_info = param.get("info");
-			tmp_info = tmp_info.replaceAll("\\<","&lt;");
-			tmp_info = tmp_info.replaceAll("\\>","&gt;");
-			tmp_info = tmp_info.replaceAll("\\n","<br \\/>");
-			param.put("info",tmp_info);
-
-
-			db.exStatement(	"UPDATE user " +
-							"SET  email = '"+param.get("email")+"',"+
-								  "nick = '"+param.get("nick")+"',"+
-								  (param.get("noSavePsw")!=null?"":",psw = '"+param.get("psw")+"' " )+
-								  (param.get("active")!= null && Integer.valueOf(param.get("active")) >= 0 ? ",active = '" + param.get("active") + "'": "" )+
-								  " WHERE id = '" + this.id +"'");
-
-
-
-
-
-		} catch (SQLException e) {
-			cx.setAttribute("DEBUG", "e " + e.getMessage() + " state: "+e.getSQLState() + " sqlerrcode" + e.getErrorCode());
-
-			e.printStackTrace();
-		}
-
-	}
-
-
-	/**
-	 * Returns id of loaded user.
-	 *
-	 * @return int
-	 */
-	public int getId(){
-		return id;
-	}
-
-	/**
-	 * Returns loaded parameters, which are saved in Map<String,String>.
-	 * @return Map<String,String> loaded parameters, which are saved in Map<String,String>.
-	 */
-	public Map<String,String> getParam(){
-		return paramStr;
-	}
-
-	/**
-	 * Method returns nick of loaded user.
-	 * @return
-	 */
-	public String getNick(){
-		return paramStr.get("nick");
-	}
-
-	/**
-	 * Method checks if exists user with nick.
-	 * @param testNick
-	 * @return
-	 */
-	public boolean existsNick(String testNick){
-		boolean exists = false;
-
-		String qy = "SELECT * FROM user WHERE LOWER(nick) LIKE '"+testNick.toLowerCase()+"' LIMIT 1";
-		try {
-			rs = db.exQuery(qy);
-
-			if ( rs.next() ) {
-				if(rs.getInt("id") > 0){
-					return true;
-				}
-			}
-
-		} catch (SQLException e) {
-			e.printStackTrace();
-		}
-
-		return exists;
-
-	}
-
-
-	/**
-	 * Method checks if user exists by him e-mail.
-	 *
-	 * @param testEmail
-	 * @return
-	 */
-	public boolean existsEmail(String testEmail){
-		boolean exists = false;
-
-		String qy = "SELECT * FROM user WHERE LOWER(email) LIKE '"+testEmail.toLowerCase()+"' LIMIT 1";
-		try {
-			rs = db.exQuery(qy);
-
-			if ( rs.next() ) {
-				if ( rs.getInt("id") > 0 ) {
-					return true;
-				}
-			}
-
-		} catch (SQLException e) {
-			e.printStackTrace();
-		}
-
-		return exists;
-
-	}
-
-
-
-}
diff --git a/sources/src/cz/zcu/kiv/offscreen/user/Util.java b/sources/src/cz/zcu/kiv/offscreen/user/Util.java
deleted file mode 100644
index 017b4ce..0000000
--- a/sources/src/cz/zcu/kiv/offscreen/user/Util.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package cz.zcu.kiv.offscreen.user;
-
-import net.sf.json.JSONObject;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class Util {
-	
-	
-	
-	/**
-	 *	Method do a hash code from string.
-	 *
-	 * @param md5 - String to hash
-	 * @return String - hashcode 
-	 */
-	public static String MD5(String md5) {
-		   try {
-		        java.security.MessageDigest md = java.security.MessageDigest.getInstance("MD5");
-		        byte[] array = md.digest(md5.getBytes());
-		        StringBuffer sb = new StringBuffer();
-		        for (int i = 0; i < array.length; ++i) {
-		          sb.append(Integer.toHexString((array[i] & 0xFF) | 0x100).substring(1,3));
-		       }
-		        return sb.toString();
-		    } catch (java.security.NoSuchAlgorithmException e) {
-		    }
-		    return null;
-	}
-	
-	
-	public static String formatDate(String date){	
-		String pattern = "(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2}).*";
-		Pattern pat = Pattern.compile(pattern);
-		Matcher matches = pat.matcher(date);
-		String formatedDate = "";
-		
-		if(matches.find()){			
-			formatedDate = matches.group(3) + "." + matches.group(2) + "." +  matches.group(1) + " " + matches.group(4) + ":" +  matches.group(5);			
-		}
-		
-		return formatedDate;
-	}
-
-	
-	
-	
-	
-}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/api/BaseEdge.java b/sources/src/main/java/cz/zcu/kiv/offscreen/api/BaseEdge.java
new file mode 100644
index 0000000..5a62f65
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/api/BaseEdge.java
@@ -0,0 +1,78 @@
+package cz.zcu.kiv.offscreen.api;
+
+/**
+ * Class represents edge. Class contains attributes which are common for input JSON format and for
+ * output JSON format (JSON between frontend and backend)
+ */
+public class BaseEdge {
+    /** identification number of edge */
+    private int id;
+    /** original ID of vertex from edge leads */
+    private int from;
+    /** original ID of vertex where edge leads */
+    private int to;
+    /** additional info */
+    private String text;
+
+    public BaseEdge(int id, int from, int to, String text) {
+        this.id = id;
+        this.from = from;
+        this.to = to;
+        this.text = text;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public int getFrom() {
+        return from;
+    }
+
+    public void setFrom(int from) {
+        this.from = from;
+    }
+
+    public int getTo() {
+        return to;
+    }
+
+    public void setTo(int to) {
+        this.to = to;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    /**
+     * Generate hash code based on attributes {@code from} and {@code to}.
+     * @return generated hash code.
+     */
+    @Override
+    public int hashCode() {
+        return from * 100000 + to;
+    }
+
+    /**
+     * Two edges are equals where their {@code from} and {@code to} are equals.
+     *
+     * @param edge which will be compared with this instance
+     * @return tru if edges are equal, false otherwise
+     */
+    @Override
+    public boolean equals(Object edge) {
+        if (!(edge instanceof BaseEdge)) return false;
+
+        BaseEdge cmpEdge = (BaseEdge) edge;
+        return from == cmpEdge.from && to == cmpEdge.to;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/api/BaseVertex.java b/sources/src/main/java/cz/zcu/kiv/offscreen/api/BaseVertex.java
new file mode 100644
index 0000000..2fad2f0
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/api/BaseVertex.java
@@ -0,0 +1,87 @@
+package cz.zcu.kiv.offscreen.api;
+
+/**
+ * Class represents vertex. Class contains attributes which are common for input JSON format and for
+ * output JSON format (JSON between frontend and backend)
+ */
+public class BaseVertex {
+
+    /** New generated identification number. */
+    private int id;
+    /** Identification number which is in input file. */
+    private int originalId;
+    /** Title of vertex. */
+    private String title;
+    /** Index of vertex archetype. */
+    private int archetypeIndex;
+    /** Additional info. */
+    private String text;
+
+    public BaseVertex(int id, int originalId, String title, int archetypeIndex, String text) {
+        this.id = id;
+        this.originalId = originalId;
+        this.title = title;
+        this.archetypeIndex = archetypeIndex;
+        this.text = text;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public int getOriginalId() {
+        return originalId;
+    }
+
+    public void setOriginalId(int originalId) {
+        this.originalId = originalId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public int getArchetype() {
+        return archetypeIndex;
+    }
+
+    public void setArchetype(int archetypeIndex) {
+        this.archetypeIndex = archetypeIndex;
+    }
+
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+
+    /**
+     * Generate hash code which is based on {@code originalId}.
+     * @return generated has code
+     */
+    @Override
+    public int hashCode() {
+        return originalId;
+    }
+
+    /**
+     * Two vertices are equals when their {@code originalId} is equals.
+     * @param edge which will be compared with this instance
+     * @return true if vertices are equal, false otherwise
+     */
+    @Override
+    public boolean equals(Object edge) {
+        if (!(edge instanceof BaseVertex)) return false;
+        return originalId == ((BaseVertex) edge).originalId;
+    }
+}
\ No newline at end of file
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/api/Edge.java b/sources/src/main/java/cz/zcu/kiv/offscreen/api/Edge.java
new file mode 100644
index 0000000..edbeceb
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/api/Edge.java
@@ -0,0 +1,36 @@
+package cz.zcu.kiv.offscreen.api;
+
+import java.util.List;
+
+/**
+ * Class represents edge which is used for output JSON format (JSON between frontend and backend).
+ */
+public class Edge extends BaseEdge {
+
+    /**
+     * List of subedgeInfo.
+     * When two input edges are equals, in output their are in one record and their differences are in subedgeInfo.
+     */
+    private List<SubedgeInfo> subedgeInfo;
+
+    /**
+     * Create new edge.
+     * @param id new generated identification number
+     * @param from original ID of vertex from edge leads
+     * @param to original ID of vertex where edge leads
+     * @param text additional info
+     * @param subedgeInfo list which contains differences between equals edges
+     */
+    public Edge(int id, int from, int to, String text, List<SubedgeInfo> subedgeInfo) {
+        super(id, from, to, text);
+        this.subedgeInfo = subedgeInfo;
+    }
+
+    public List<SubedgeInfo> getSubedgeInfo(){
+        return subedgeInfo;
+    }
+
+    public void setSubedgeInfo(List<SubedgeInfo> subedgeInfo) {
+        this.subedgeInfo = subedgeInfo;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/api/GraphExport.java b/sources/src/main/java/cz/zcu/kiv/offscreen/api/GraphExport.java
new file mode 100644
index 0000000..1c7218e
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/api/GraphExport.java
@@ -0,0 +1,101 @@
+package cz.zcu.kiv.offscreen.api;
+
+import cz.zcu.kiv.offscreen.graph.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+
+/**
+ * Class represents graph with all information about graph plus information about state in which used store graph.
+ * Class is used for creating of JSON which is send to frontend.
+ */
+public class GraphExport {
+
+    private List<Vertex> vertices;
+    private List<Edge> edges;
+    private List<VertexArchetype> vertexArchetypes;
+    private List<EdgeArchetype> edgeArchetypes;
+    private List<AttributeType> attributeTypes;
+    private Map<String, List<String>> possibleEnumValues;
+    private Map<String, String> archetypeIcons;
+
+    private List<Group> groups;
+    private List<Position> positions;
+    private List<SideBar> sideBar;
+    private int selectedVertex;
+    private int selectedEdge;
+
+    private Logger logger = Logger.getLogger(GraphExport.class);
+
+    public GraphExport(Graph graph) {
+        logger.trace("ENTRY");
+        this.vertices = new ArrayList<>(graph.getVertices().values());
+        this.edges = new ArrayList<>(graph.getEdges());
+        this.vertexArchetypes = new ArrayList<>(graph.getVertexArchetypes());
+        this.edgeArchetypes = new ArrayList<>(graph.getEdgeArchetypes());
+        this.attributeTypes = new ArrayList<>(graph.getAttributeTypes());
+        this.possibleEnumValues = graph.getPossibleEnumValues();
+        this.archetypeIcons = graph.getArchetypeIcons();
+        this.groups = graph.getGraphState().getGroups();
+        this.positions = graph.getGraphState().getPositions();
+        this.sideBar = graph.getGraphState().getSideBar();
+        this.selectedVertex = graph.getGraphState().getSelectedVertex();
+        this.selectedEdge = graph.getGraphState().getSelectedEdge();
+        logger.trace("EXIT");
+    }
+
+    public List<Edge> getEdges() {
+        logger.trace("ENTRY");
+        logger.trace("EXIT");
+        return edges;
+    }
+
+    public List<Vertex> getVertices() {
+        logger.trace("ENTRY");
+        logger.trace("EXIT");
+        return vertices;
+    }
+
+    public List<VertexArchetype> getVertexArchetypes() {
+        return vertexArchetypes;
+    }
+
+    public List<EdgeArchetype> getEdgeArchetypes() {
+        return edgeArchetypes;
+    }
+
+    public List<AttributeType> getAttributeTypes() {
+        return attributeTypes;
+    }
+
+    public Map<String, List<String>> getPossibleEnumValues() {
+        return possibleEnumValues;
+    }
+
+    public Map<String, String> getArchetypeIcons() {
+        return archetypeIcons;
+    }
+
+    public List<Group> getGroups() {
+        return groups;
+    }
+
+    public List<Position> getPositions() {
+        return positions;
+    }
+
+    public List<SideBar> getSideBar() {
+        return sideBar;
+    }
+
+    public int getSelectedVertex() {
+        return selectedVertex;
+    }
+
+    public int getSelectedEdge() {
+        return selectedEdge;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/api/Group.java b/sources/src/main/java/cz/zcu/kiv/offscreen/api/Group.java
new file mode 100644
index 0000000..756c442
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/api/Group.java
@@ -0,0 +1,101 @@
+package cz.zcu.kiv.offscreen.api;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Class represents group of edges and their settings. Used in JSON between frontend and backend.
+ */
+public class Group {
+
+    /** Generated id of group which is unique only in groups. */
+    private int groupId;
+    /** Generated if of group which is unique in groups and vertexes. */
+    private int id;
+    /** Name of group */
+    private String name;
+    /** List of vertices id which belongs to this group */
+    private List<Integer> verticesId;
+    /** List of vertices id whose outgoing edges are visible. */
+    private List<Integer> verticesEdgeFromId;
+    /** List of vertices id whose incoming edges are visible. */
+    private List<Integer> verticesEdgeToId;
+
+    public Group(int groupId, int id, String name){
+        this.groupId = groupId;
+        this.id = id;
+        this.name = name;
+        verticesId = new ArrayList<>();
+        verticesEdgeFromId = new ArrayList<>();
+        verticesEdgeToId = new ArrayList<>();
+    }
+
+    public Group(int groupId, int id, String name, List<Integer> verticesId, List<Integer> verticesEdgeFromId, List<Integer> verticesEdgeToId) {
+        this.groupId = groupId;
+        this.id = id;
+        this.name = name;
+        this.verticesId = verticesId;
+        this.verticesEdgeFromId = verticesEdgeFromId;
+        this.verticesEdgeToId = verticesEdgeToId;
+    }
+
+    public int getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(int groupId) {
+        this.groupId = groupId;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<Integer> getVerticesId() {
+        return verticesId;
+    }
+
+    public void setVerticesId(List<Integer> verticesId) {
+        this.verticesId = verticesId;
+    }
+
+    public List<Integer> getVerticesEdgeFromId() {
+        return verticesEdgeFromId;
+    }
+
+    public void setVerticesEdgeFromId(List<Integer> verticesEdgeFromId) {
+        this.verticesEdgeFromId = verticesEdgeFromId;
+    }
+
+    public List<Integer> getVerticesEdgeToId() {
+        return verticesEdgeToId;
+    }
+
+    public void setVerticesEdgeToId(List<Integer> verticesEdgeToId) {
+        this.verticesEdgeToId = verticesEdgeToId;
+    }
+
+    public void addVertexId(int vertexId){
+        this.verticesId.add(vertexId);
+    }
+
+    public void addVetexEdgeToId(int vertexId){
+        this.verticesEdgeToId.add(vertexId);
+    }
+
+    public void addVetexEdgeFromId(int vertexId){
+        this.verticesEdgeFromId.add(vertexId);
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/api/Position.java b/sources/src/main/java/cz/zcu/kiv/offscreen/api/Position.java
new file mode 100644
index 0000000..452c16d
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/api/Position.java
@@ -0,0 +1,44 @@
+package cz.zcu.kiv.offscreen.api;
+
+/**
+ * Class is used for storing information about vertex/group relative position.
+ */
+public class Position {
+
+    /** Identification number of vertex or group which was generated in application. */
+    private int vertexId;
+    /** Relative X position. */
+    private float x;
+    /** Relative Y position */
+    private float y;
+
+    public Position(int vertexId, float x, float y) {
+        this.vertexId = vertexId;
+        this.x = x;
+        this.y = y;
+    }
+
+    public int getVertexId() {
+        return vertexId;
+    }
+
+    public void setVertexId(int vertexId) {
+        this.vertexId = vertexId;
+    }
+
+    public float getX() {
+        return x;
+    }
+
+    public void setX(float x) {
+        this.x = x;
+    }
+
+    public float getY() {
+        return y;
+    }
+
+    public void setY(float y) {
+        this.y = y;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/api/SideBar.java b/sources/src/main/java/cz/zcu/kiv/offscreen/api/SideBar.java
new file mode 100644
index 0000000..df26bd9
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/api/SideBar.java
@@ -0,0 +1,33 @@
+package cz.zcu.kiv.offscreen.api;
+
+/**
+ * Class store information about item in side bar.
+ */
+public class SideBar {
+
+    /** Identification number of vertex or group which was generated in application. */
+    private int vertexId;
+    /** Indicates if related vertexes of this item have visible icon which shows relation with this item. */
+    private boolean highlighted;
+
+    public SideBar(int vertexId, boolean highlighted) {
+        this.vertexId = vertexId;
+        this.highlighted = highlighted;
+    }
+
+    public int getVertexId() {
+        return vertexId;
+    }
+
+    public void setVertexId(int vertexId) {
+        this.vertexId = vertexId;
+    }
+
+    public boolean isHighlighted() {
+        return highlighted;
+    }
+
+    public void setHighlighted(boolean highlighted) {
+        this.highlighted = highlighted;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/api/SubedgeInfo.java b/sources/src/main/java/cz/zcu/kiv/offscreen/api/SubedgeInfo.java
new file mode 100644
index 0000000..f1fb208
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/api/SubedgeInfo.java
@@ -0,0 +1,37 @@
+package cz.zcu.kiv.offscreen.api;
+
+import java.util.List;
+
+public class SubedgeInfo {
+
+    /** Edge archetype index. */
+    private int archetype;
+    /** Original id of edge which is taken from input JSON file. */
+    private int originalId;
+    /** List of all tributes. Every attribute is stored in String array in pair as {attribute name, attribute value}. */
+    private List<String[]> attributes;
+
+    /**
+     * Create new subedgeInfo
+     * @param originalId Original id of edge which is taken from input JSON file.
+     * @param archetype Edge archetype index.
+     * @param attributes  List of all tributes. Every attribute is stored in String array in pair as {attribute name, attribute value}.
+     */
+    public SubedgeInfo(int originalId, int archetype, List<String[]> attributes) {
+        this.originalId = originalId;
+        this.archetype = archetype;
+        this.attributes = attributes;
+    }
+
+    public int getOriginalId() {
+        return originalId;
+    }
+
+    public int getArchetype() {
+        return archetype;
+    }
+
+    public List<String[]> getAttributes() {
+        return attributes;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/api/Vertex.java b/sources/src/main/java/cz/zcu/kiv/offscreen/api/Vertex.java
new file mode 100644
index 0000000..7101628
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/api/Vertex.java
@@ -0,0 +1,34 @@
+package cz.zcu.kiv.offscreen.api;
+
+import java.util.List;
+
+/**
+ * Class represents vertex which is used for output JSON format (JSON between frontend and backend)
+ */
+public class Vertex extends BaseVertex {
+
+    /** List of all tributes. Every attribute is stored in String array in pair as {attribute name, attribute value}. */
+    private List<String[]> attributes;
+
+    /**
+     * Create new vertex.
+     * @param id new generated identification number.
+     * @param originalId original identification number from input file
+     * @param title title of vertex
+     * @param archetypeIndex index of vertex archetype
+     * @param text additional info
+     * @param attributes List of all attributes. Every attribute is stored in String array in pair as {attribute name, attribute value}.
+     */
+    public Vertex(int id, int originalId, String title, int archetypeIndex, String text, List<String[]> attributes) {
+        super(id, originalId, title, archetypeIndex, text);
+        this.attributes = attributes;
+    }
+
+    public List<String[]> getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(List<String[]> attributes) {
+        this.attributes = attributes;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexData.java b/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexData.java
new file mode 100644
index 0000000..ffe04e8
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexData.java
@@ -0,0 +1,46 @@
+///**
+// *
+// */
+//package cz.zcu.kiv.offscreen.data.efpportal;
+//
+//import java.util.HashMap;
+//import java.util.Map;
+//
+///**
+// *
+// * Representation of EFPPortal's connections . A connection consists of a provided and required features.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class CocaexData {
+//	/**
+//	 * Map of all provided features.
+//	 */
+//	private Map<String, CocaexDataFeature> providedFeatures;
+//
+//	/**
+//	 * Map of all required features.
+//	 */
+//	private Map<String, CocaexDataFeature> requiredFeatures;
+//
+//	public CocaexData() {
+//		this.providedFeatures = new HashMap<String, CocaexDataFeature>();
+//		this.requiredFeatures = new HashMap<String, CocaexDataFeature>();
+//	}
+//
+//	/**
+//	 * @return the providedFeatures
+//	 */
+//	public Map<String, CocaexDataFeature> getProvidedFeatures() {
+//		return providedFeatures;
+//	}
+//
+//	/**
+//	 * @return the importedFeatures
+//	 */
+//	public Map<String, CocaexDataFeature> getRequiredFeatures() {
+//		return requiredFeatures;
+//	}
+//
+//}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataEfp.java b/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataEfp.java
new file mode 100644
index 0000000..80f677f
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataEfp.java
@@ -0,0 +1,69 @@
+//package cz.zcu.kiv.offscreen.data.efpportal;
+//
+//import cz.zcu.kiv.efps.comparator.result.EfpEvalResult.MatchingResult;
+//import cz.zcu.kiv.efps.types.datatypes.EfpValueType;
+//
+///**
+// * Holds EFP's data.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class CocaexDataEfp {
+//	private String efpName;
+//	private String efpValueTypeName;
+//	private EfpValueType efpValue;
+//	private MatchingResult typeError;
+//
+//	/**
+//	 * @return the efpName
+//	 */
+//	public String getEfpName() {
+//		return efpName;
+//	}
+//	/**
+//	 * @param efpName the efpName to set
+//	 */
+//	public void setEfpName(String efpName) {
+//		this.efpName = efpName;
+//	}
+//	/**
+//	 * @return the efpValueTypeName
+//	 */
+//	public String getEfpValueTypeName() {
+//		return efpValueTypeName;
+//	}
+//	/**
+//	 * @param efpValueTypeName the efpValueTypeName to set
+//	 */
+//	public void setEfpValueTypeName(String efpValueTypeName) {
+//		this.efpValueTypeName = efpValueTypeName;
+//	}
+//	/**
+//	 * @return the efpValue
+//	 */
+//	public EfpValueType getEfpValue() {
+//		return efpValue;
+//	}
+//	/**
+//	 * @param efpValue the efpValue to set
+//	 */
+//	public void setEfpValue(EfpValueType efpValue) {
+//		this.efpValue = efpValue;
+//	}
+//
+//	/**
+//	 * @return the typeError
+//	 */
+//	public MatchingResult getTypeError() {
+//		return typeError;
+//	}
+//
+//	/**
+//	 * @param typeError the typeError to set
+//	 */
+//	public void setTypeError(MatchingResult typeError) {
+//		this.typeError = typeError;
+//	}
+//
+//}
\ No newline at end of file
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataFeature.java b/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataFeature.java
new file mode 100644
index 0000000..d3870c2
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexDataFeature.java
@@ -0,0 +1,33 @@
+//package cz.zcu.kiv.offscreen.data.efpportal;
+//
+//import java.util.ArrayList;
+//import java.util.List;
+//
+///**
+// * Holds feature's data.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class CocaexDataFeature {
+//	private List<CocaexDataEfp> efps;
+//
+//	public CocaexDataFeature() {
+//		this.efps = new ArrayList<CocaexDataEfp>();
+//	}
+//
+//	/**
+//	 * @return the efps
+//	 */
+//	public List<CocaexDataEfp> getEfps() {
+//		return efps;
+//	}
+//
+//	/**
+//	 * @param efps the efps to set
+//	 */
+//	public void setEfps(List<CocaexDataEfp> efps) {
+//		this.efps = efps;
+//	}
+//
+//}
\ No newline at end of file
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexWrapper.java b/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexWrapper.java
new file mode 100644
index 0000000..32fdd62
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/data/efpportal/CocaexWrapper.java
@@ -0,0 +1,66 @@
+//package cz.zcu.kiv.offscreen.data.efpportal;
+//
+//import java.util.Map;
+//
+///**
+// *
+// * EFPPortal export data wrapper. Contains mappings for feature connection names and EFPs names.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class CocaexWrapper {
+//	/**
+//	 * Feature names mapping.
+//	 */
+//	private Map<String, String> featureMappings;
+//
+//	/**
+//	 * EFPs name s mapping.
+//	 */
+//	private Map<String, String> efpMappings;
+//
+//	/**
+//	 * EFPPortal data with IDs instead of names for EFPs and Features.
+//	 */
+//	private Map<String, CocaexData> data;
+//
+//	/**
+//	 * @return the featureMappings
+//	 */
+//	public Map<String, String> getFeatureMappings() {
+//		return featureMappings;
+//	}
+//	/**
+//	 * @param featureMappings the featureMappings to set
+//	 */
+//	public void setFeatureMappings(Map<String, String> featureMappings) {
+//		this.featureMappings = featureMappings;
+//	}
+//	/**
+//	 * @return the efpMappings
+//	 */
+//	public Map<String, String> getEfpMappings() {
+//		return efpMappings;
+//	}
+//	/**
+//	 * @param efpMappings the efpMappings to set
+//	 */
+//	public void setEfpMappings(Map<String, String> efpMappings) {
+//		this.efpMappings = efpMappings;
+//	}
+//	/**
+//	 * @return the data
+//	 */
+//	public Map<String, CocaexData> getData() {
+//		return data;
+//	}
+//	/**
+//	 * @param data the data to set
+//	 */
+//	public void setData(Map<String, CocaexData> data) {
+//		this.data = data;
+//	}
+//
+//
+//}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/efp/utils/JsonTransformer.java b/sources/src/main/java/cz/zcu/kiv/offscreen/efp/utils/JsonTransformer.java
new file mode 100644
index 0000000..1d33aac
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/efp/utils/JsonTransformer.java
@@ -0,0 +1,101 @@
+//package cz.zcu.kiv.offscreen.efp.utils;
+//
+//import java.io.ByteArrayInputStream;
+//import java.io.IOException;
+//import java.util.zip.GZIPInputStream;
+//
+//import javax.servlet.http.HttpServletRequest;
+//
+//import org.apache.log4j.Logger;
+//
+//import net.sf.json.JSONObject;
+//
+//import org.apache.commons.codec.binary.Base64;
+//import org.apache.commons.io.IOUtils;
+//
+//import com.google.gson.Gson;
+//import com.google.gson.GsonBuilder;
+//
+//import cz.zcu.kiv.efps.types.datatypes.EfpValueType;
+//import cz.zcu.kiv.efps.types.serialisation.json.EfpValueTypeAdapter;
+//import cz.zcu.kiv.offscreen.api.GraphInterface;
+//import cz.zcu.kiv.offscreen.data.efpportal.CocaexWrapper;
+//import cz.zcu.kiv.offscreen.graph.GraphExport;
+//import cz.zcu.kiv.offscreen.graph.creator.EfpGraphTransfomer;
+//
+///**
+// *
+// * Transofma and decompress tools for incoming JSON.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class JsonTransformer {
+//	private Logger logger = Logger.getLogger(JsonTransformer.class);
+//
+//	/**
+//	 *
+//	 * Deserialize input JSON and transform to graph JSON.
+//	 *
+//	 * @param inputJSON
+//	 * @param request
+//	 * @return
+//	 * @throws IOException
+//	 */
+//	public String transformInputJSONToGraphJSON(String inputJSON,
+//			HttpServletRequest request) throws IOException {
+//		CocaexWrapper efpResults;
+//
+//		GsonBuilder gsonBuilder = new GsonBuilder();
+//		// JSON deserializing adapter provided for EFP type classes
+//		gsonBuilder.registerTypeAdapter(EfpValueType.class,
+//				new EfpValueTypeAdapter());
+//		// JSON deserializing adapter for the Wrapper class
+//		gsonBuilder.registerTypeAdapter(CocaexWrapper.class,
+//				new WrapperDeserializer());
+//		Gson gson = gsonBuilder.create();
+//
+//		// decode + unzip received data
+//		String data = decompress(inputJSON);
+//
+//		// deserialize using deserializer adapters
+//		efpResults = gson.fromJson(data, CocaexWrapper.class);
+//
+//		request.setAttribute("efpPortalEfpNames", efpResults.getEfpMappings());
+//
+//		// transform received data to readable graph form
+//		EfpGraphTransfomer transformer = new EfpGraphTransfomer(efpResults);
+//		GraphInterface graph = transformer.transform();
+//		GraphExport export = new GraphExport(graph);
+//
+//		// transform graph to JSON
+//		JSONObject o = JSONObject.fromObject(export);
+//
+//		return o.toString();
+//	}
+//
+//	/**
+//	 * Decode and unzip a Base64 encoded GZIPed string.
+//	 *
+//	 * @param input
+//	 * @return
+//	 * @throws IOException
+//	 */
+//	private String decompress(String input) throws IOException {
+//		logger.trace("ENTRY");
+//		String result = null;
+//
+//		byte[] bytes = Base64.decodeBase64(input);
+//		GZIPInputStream zi = null;
+//		try {
+//			zi = new GZIPInputStream(new ByteArrayInputStream(bytes));
+//			result = IOUtils.toString(zi);
+//		} finally {
+//			IOUtils.closeQuietly(zi);
+//		}
+//		logger.trace("EXIT");
+//
+//		return result;
+//	}
+//
+//}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/efp/utils/WrapperDeserializer.java b/sources/src/main/java/cz/zcu/kiv/offscreen/efp/utils/WrapperDeserializer.java
new file mode 100644
index 0000000..fcff7f7
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/efp/utils/WrapperDeserializer.java
@@ -0,0 +1,76 @@
+//package cz.zcu.kiv.offscreen.efp.utils;
+//
+//import java.lang.reflect.Type;
+//import java.util.HashMap;
+//import java.util.Map;
+//
+//import org.apache.log4j.Logger;
+//
+//import com.google.gson.Gson;
+//import com.google.gson.GsonBuilder;
+//import com.google.gson.JsonDeserializationContext;
+//import com.google.gson.JsonDeserializer;
+//import com.google.gson.JsonElement;
+//import com.google.gson.JsonObject;
+//
+//import cz.zcu.kiv.efps.types.datatypes.EfpValueType;
+//import cz.zcu.kiv.efps.types.serialisation.json.EfpValueTypeAdapter;
+//import cz.zcu.kiv.offscreen.data.efpportal.CocaexData;
+//import cz.zcu.kiv.offscreen.data.efpportal.CocaexWrapper;
+//
+///**
+// *
+// * CocaexWrapper class deserializer.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class WrapperDeserializer implements JsonDeserializer<CocaexWrapper> {
+//	private Logger logger = Logger.getLogger(WrapperDeserializer.class);
+//
+//	@Override
+//	public CocaexWrapper deserialize(JsonElement json, Type typeOfT,
+//			JsonDeserializationContext context) {
+//		logger.trace("ENTRY");
+//
+//		GsonBuilder gsonBuilder = new GsonBuilder();
+//		// JSON deserializing adapter provided for EFP type classes
+//		gsonBuilder.registerTypeAdapter(EfpValueType.class,
+//				new EfpValueTypeAdapter());
+//		Gson gson = gsonBuilder.create();
+//
+//		CocaexWrapper wrapper = gson.fromJson(json, CocaexWrapper.class);
+//		JsonObject jo = json.getAsJsonObject();
+//
+//		Map<String, String> featureMappings = new HashMap<String, String>();
+//		Map<String, String> efpMappings = new HashMap<String, String>();
+//		Map<String, CocaexData> data = new HashMap<String, CocaexData>();
+//
+//		// parse feature mappings
+//		JsonObject featuresObject = jo.getAsJsonObject("featureMappings");
+//		for (Map.Entry<String, JsonElement> entry : featuresObject.entrySet()) {
+//			featureMappings.put(entry.getKey(), entry.getValue().getAsString());
+//		}
+//
+//		// parse efps mappings
+//		JsonObject efpsObject = jo.getAsJsonObject("efpMappings");
+//		for (Map.Entry<String, JsonElement> entry : efpsObject.entrySet()) {
+//			efpMappings.put(entry.getKey(), entry.getValue().getAsString());
+//		}
+//
+//		// parse data
+//		JsonObject dataObject = jo.getAsJsonObject("data");
+//		for (Map.Entry<String, JsonElement> entry : dataObject.entrySet()) {
+//			data.put(entry.getKey(), (CocaexData) context.deserialize(
+//					entry.getValue(), CocaexData.class));
+//		}
+//
+//		// fill output structure
+//		wrapper.setFeatureMappings(featureMappings);
+//		wrapper.setEfpMappings(efpMappings);
+//		wrapper.setData(data);
+//		logger.trace("EXIT");
+//
+//		return wrapper;
+//	}
+//}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/Attribute.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/Attribute.java
new file mode 100644
index 0000000..4a7daaa
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/Attribute.java
@@ -0,0 +1,32 @@
+package cz.zcu.kiv.offscreen.graph;
+
+/**
+ * This class represents attribute of edge or vertex.
+ */
+public class Attribute {
+    /** Index to array of attribute types which is defined in input JSON file */
+    private int typeIndex;
+    /** Value of attribute */
+    private Object value;
+
+    public Attribute(int typeIndex, Object value) {
+        this.typeIndex = typeIndex;
+        this.value = value;
+    }
+
+    public int getTypeIndex() {
+        return typeIndex;
+    }
+
+    public void setTypeIndex(int typeIndex) {
+        this.typeIndex = typeIndex;
+    }
+
+    public Object getValue() {
+        return value;
+    }
+
+    public void setValue(Object value) {
+        this.value = value;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/AttributeType.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/AttributeType.java
new file mode 100644
index 0000000..1240c67
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/AttributeType.java
@@ -0,0 +1,32 @@
+package cz.zcu.kiv.offscreen.graph;
+
+/**
+ * Class represents one attribute type which is used in input JSON file and in output JSON file (file between frontend
+ * and backend).
+ */
+public class AttributeType {
+    /** name of attribute */
+    public String name;
+    /** data type of attribute */
+    public GraphManager.AttributeDataType dataType;
+    /** additional info */
+    public String text;
+
+    public AttributeType(String name, GraphManager.AttributeDataType dataType, String text) {
+        this.name = name;
+        this.dataType = dataType;
+        this.text = text;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public GraphManager.AttributeDataType getDataType() {
+        return dataType;
+    }
+
+    public String getText() {
+        return text;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/EdgeArchetype.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/EdgeArchetype.java
new file mode 100644
index 0000000..71b1995
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/EdgeArchetype.java
@@ -0,0 +1,19 @@
+package cz.zcu.kiv.offscreen.graph;
+
+public class EdgeArchetype {
+    public String name;
+    public String text;
+
+    EdgeArchetype(String name, String text) {
+        this.name = name;
+        this.text = text;
+    }
+
+    public String getName() {
+        return  name;
+    }
+
+    public String getText() {
+        return text;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/EdgeArchetypeInfo.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/EdgeArchetypeInfo.java
new file mode 100644
index 0000000..d61acfc
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/EdgeArchetypeInfo.java
@@ -0,0 +1,35 @@
+package cz.zcu.kiv.offscreen.graph;
+
+public class EdgeArchetypeInfo {
+    /**
+     * index of the archetype of the vertex the edge leads to
+     */
+    public int fromArchetypeIndex;
+
+    /**
+     * index of the archetype of the edge
+     */
+    public int edgeArchetypeIndex;
+
+    /**
+     * index of the archetype of the vertex the edge leads from
+     */
+    public int toArchetypeIndex;
+
+    public EdgeArchetypeInfo(int fromArchetypeIndex, int edgeArchetypeIndex, int toArchetypeIndex) {
+        this.fromArchetypeIndex = fromArchetypeIndex;
+        this.edgeArchetypeIndex = edgeArchetypeIndex;
+        this.toArchetypeIndex = toArchetypeIndex;
+    }
+
+    @Override
+    public int hashCode() {
+        return fromArchetypeIndex * 10000 + edgeArchetypeIndex * 100 + fromArchetypeIndex;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        EdgeArchetypeInfo info = (EdgeArchetypeInfo)obj;
+        return (info.fromArchetypeIndex == fromArchetypeIndex) && (info.edgeArchetypeIndex == edgeArchetypeIndex) && (info.toArchetypeIndex == toArchetypeIndex);
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/EdgeImpl.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/EdgeImpl.java
new file mode 100644
index 0000000..a696afe
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/EdgeImpl.java
@@ -0,0 +1,85 @@
+package cz.zcu.kiv.offscreen.graph;
+
+import cz.zcu.kiv.offscreen.api.BaseEdge;
+
+import java.util.*;
+
+/**
+ * Class represents edge which is used for input JSON format.
+ */
+public class EdgeImpl extends BaseEdge {
+
+    /** original identification number which is defined in input file */
+    private int originalId;
+    /** index of edge archetype */
+    private int archetypeIndex;
+    /** Map contains attributes stored in key value format. Key is index to array of attribute types defined in input file */
+    private Map<Integer, Attribute> attributesMap;
+
+    /**
+     * Create new edge.
+     * @param id new generated identification number
+     * @param from original ID of vertex from edge leads
+     * @param to original ID of vertex where edge leads
+     * @param text additional info
+     * @param originalId original identification number which is defined in input file
+     * @param archetypeIndex index of edge archetype
+     */
+    public EdgeImpl(int id, int from, int to, String text, int originalId, int archetypeIndex) {
+        super(id, from, to, text);
+        this.originalId = originalId;
+        this.archetypeIndex = archetypeIndex;
+        this.attributesMap = new HashMap<>();
+    }
+
+    public Attribute getAttribute(int attrTypeIndex) {
+        return attributesMap.get(attrTypeIndex);
+    }
+
+    public Map<Integer, Attribute> getAttributesMap() {
+        return attributesMap;
+    }
+
+
+    public int getOriginalId() {
+        return originalId;
+    }
+
+
+    public int getArchetype() {
+        return archetypeIndex;
+    }
+
+
+    public void addAttribute(int attrTypeIndex, Object value) {
+        Attribute attr = new Attribute(attrTypeIndex, value);
+        attributesMap.put(attrTypeIndex, attr);
+    }
+
+    public void addAttributes(Map<Integer, Attribute> attributes) {
+        this.attributesMap.putAll(attributes);
+    }
+
+    public void setOriginalId(int originalId) {
+        this.originalId = originalId;
+    }
+
+    public void setArchetypeIndex(int archetypeIndex) {
+        this.archetypeIndex = archetypeIndex;
+    }
+
+    /**
+     * Return list of attributes sorted by their key value in {@code attributeMap}
+     * @return sorted list
+     */
+    public List<Attribute> getSortedAttributes() {
+        List<Attribute> list = new ArrayList<>();
+        ArrayList<Integer> indices = new ArrayList<>(attributesMap.keySet());
+        //indices.sort(Integer::compareTo);
+        Collections.sort(indices);
+        for (Integer index : indices) {
+            list.add(attributesMap.get(index));
+        }
+        return list;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/Graph.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/Graph.java
new file mode 100644
index 0000000..3a06663
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/Graph.java
@@ -0,0 +1,119 @@
+package cz.zcu.kiv.offscreen.graph;
+
+import cz.zcu.kiv.offscreen.api.Edge;
+import cz.zcu.kiv.offscreen.api.Vertex;
+import org.apache.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Class represents graph which is loaded from input JSON file.
+ */
+public class Graph {
+
+    private Map<String, Vertex> vertices;
+    private List<Edge> edges;
+    private List<VertexArchetype> vertexArchetypes;
+    private List<EdgeArchetype> edgeArchetypes;
+    private List<AttributeType> attributeTypes;
+    private Map<String, List<String>> possibleEnumValues;
+    private List<String> defaultGroupArchetypes;
+    private Map<String, String> archetypeIcons;
+
+    private GraphState graphState;
+
+    private Logger logger = Logger.getLogger(Graph.class);
+
+    public Graph() {
+        logger.trace("ENTRY");
+        this.vertices = new HashMap<String, Vertex>();
+        this.edges = new LinkedList<Edge>();
+        logger.trace("EXIT");
+    }
+
+    public List<Edge> getEdges() {
+        logger.trace("ENTRY");
+        logger.trace("EXIT");
+        return edges;
+    }
+
+    public List<VertexArchetype> getVertexArchetypes() {
+        return vertexArchetypes;
+    }
+
+    public List<EdgeArchetype> getEdgeArchetypes() {
+        return edgeArchetypes;
+    }
+
+    public void setVertexArchetypes(List<VertexArchetype> vertexArchetypes) {
+        this.vertexArchetypes = vertexArchetypes;
+    }
+
+    public  void setEdgeArchetypes(List<EdgeArchetype> edgeArchetypes) {
+        this.edgeArchetypes = edgeArchetypes;
+    }
+
+    public void setAttributeTypes(List<AttributeType> attributeTypes) {
+        this.attributeTypes = attributeTypes;
+    }
+
+    public void setPossibleEnumValues(Map<Integer, List<String>> possibleEnumValues) {
+        this.possibleEnumValues = new HashMap<>();
+        for (Integer index : possibleEnumValues.keySet()) {
+            this.possibleEnumValues.put("" + index, possibleEnumValues.get(index));
+        }
+    }
+
+    public void setArchetypeIcons(Map<String, String> archetypeIcons) {
+        this.archetypeIcons = archetypeIcons;
+    }
+
+    public List<String> getDefaultGroupArchetypes() {
+        return defaultGroupArchetypes;
+    }
+
+    public void setDefaultGroupArchetypes(List<String> defaultGroupArchetypes) {
+        this.defaultGroupArchetypes = defaultGroupArchetypes;
+    }
+
+    public List<AttributeType> getAttributeTypes() {
+        return attributeTypes;
+    }
+
+    public Map<String, List<String>> getPossibleEnumValues() {
+        return possibleEnumValues;
+    }
+
+    public Map<String, String> getArchetypeIcons() {
+        return archetypeIcons;
+    }
+
+    public Map<String, Vertex> getVertices() {
+        logger.trace("ENTRY");
+        logger.trace("EXIT");
+        return vertices;
+    }
+
+    public void addEdge(Edge edge) {
+        logger.trace("ENTRY");
+        this.edges.add(edge);
+        logger.trace("EXIT");
+    }
+
+    public void addVertex(String name, Vertex vertex) {
+        logger.trace("ENTRY");
+        this.vertices.put(name, vertex);
+        logger.trace("EXIT");
+    }
+
+    public GraphState getGraphState() {
+        return graphState;
+    }
+
+    public void setGraphState(GraphState graphState) {
+        this.graphState = graphState;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/GraphManager.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/GraphManager.java
new file mode 100644
index 0000000..116d2fe
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/GraphManager.java
@@ -0,0 +1,617 @@
+package cz.zcu.kiv.offscreen.graph;
+
+import cz.zcu.kiv.offscreen.api.Edge;
+import cz.zcu.kiv.offscreen.api.Group;
+import cz.zcu.kiv.offscreen.api.SubedgeInfo;
+import cz.zcu.kiv.offscreen.api.Vertex;
+import cz.zcu.kiv.offscreen.graph.filter.*;
+import cz.zcu.kiv.offscreen.graph.loader.JSONConfigLoader;
+
+import java.util.*;
+
+public class GraphManager {
+
+    public enum AttributeDataType {
+        NUMBER {
+            @Override
+            public String toString() {
+                return "number";
+            }
+        },
+        DATE {
+            @Override
+            public String toString() {
+                return "date";
+            }
+        },
+        ENUM {
+            @Override
+            public String toString() {
+                return "enum";
+            }
+        },
+        STRING {
+            @Override
+            public String toString() {
+                return "string";
+            }
+        }
+    }
+
+    private int lastVertexOrGroupId = 1;
+
+    public List<VertexArchetype> vertexArchetypes = new ArrayList<>();
+    public List<EdgeArchetype> edgeArchetypes = new ArrayList<>();
+    public List<AttributeType> attributeTypes = new ArrayList<>();
+
+    /**
+     * the key is the attributeType index, the value is the list of possible values
+     */
+    private Map<Integer, List<String>> possibleEnumValues = new HashMap<>();
+
+    /**
+     * key is the archetype index, value is the set of vertices of the given archetype
+     */
+    public Map<Integer, HashSet<VertexImpl>> vertices = new HashMap<>();
+
+    /**
+     * key is the triplet of archetypes {fromVertex, edge, toVertex}, value is the list of edges for the given archetype triplet
+     */
+    public Map<EdgeArchetypeInfo, List<EdgeImpl>> edges = new HashMap<>();
+
+    public void addVertexArchetype(String name, String text) {
+        vertexArchetypes.add(new VertexArchetype(name, text));
+    }
+
+    public void addEdgeArchetype(String name, String text) {
+        edgeArchetypes.add(new EdgeArchetype(name, text));
+    }
+
+
+    public void addAttributeType(String name, AttributeDataType dataType, String text) {
+        attributeTypes.add(new AttributeType(name, dataType, text));
+    }
+
+    /**
+     * Adds a list of values to the possible values hashmap. All duplicated are
+     * removed.
+     *
+     * @param attributeTypeId - Id of attribute type
+     * @param values          - List of values of the corresponding attribute type
+     */
+    public void addUniquePossibleAttributeValues(int attributeTypeId, List<String> values) {
+        if (possibleEnumValues.containsKey(attributeTypeId)) {
+            List<String> attrValues = possibleEnumValues.get(attributeTypeId);
+            List<String> valuesWithoutDuplicates = new ArrayList<>(new HashSet<>(values)); // Converting to hashset removes duplicates
+            valuesWithoutDuplicates.removeAll(attrValues);   // Values to add without values already present in the hashmap
+            attrValues.addAll(valuesWithoutDuplicates);
+        } else {
+            possibleEnumValues.put(attributeTypeId, values);
+        }
+    }
+
+    public List<Integer> getEnumPositionsForAttrIndex(int attributeTypeId, List<String> enumValues) {
+        List<Integer> positions = new ArrayList<>();
+        if (!possibleEnumValues.containsKey(attributeTypeId)) {
+            return positions;
+        }
+
+        List<String> possibleValues = possibleEnumValues.get(attributeTypeId);
+        for (int i = 0; i < possibleValues.size(); i++) {
+            String possibleValue = possibleValues.get(i);
+            if (enumValues.contains(possibleValue)) {
+                positions.add(i);
+            }
+        }
+
+        return positions;
+    }
+
+    /**
+     * Gets string values from possible enums for attribute type id.
+     * @param attributeTypeId - Id of the attribute type
+     * @param valuePositions - List of positions in the possible enums hashmap for which to find the enum values.
+     * @return - List of string values of enums.
+     */
+    private List<String> getEnumStringsForAttrIndex(int attributeTypeId, List<Integer> valuePositions) {
+        List<String> values = new ArrayList<>();
+
+        List<String> possibleValues = possibleEnumValues.get(attributeTypeId);
+        for (int i = 0; i < possibleValues.size(); i++) {
+            if (valuePositions.contains(i)) {
+                values.add(possibleValues.get(i));
+            }
+        }
+
+        return values;
+    }
+
+    public AttributeType getAttributeDataTypeByName(String attributeName) {
+        return attributeTypes.get(getAttributeIndex(attributeName));
+    }
+
+    /**
+     * Adds a record to the possibleEnumValues hashset of the attributes possible values.
+     *
+     * @param attributeIndex - Index of the attribute for which to add the possible values
+     * @param possibleValues - All the possible values of the attribute
+     */
+    public void addEnumValues(int attributeIndex, List<String> possibleValues) {
+        possibleEnumValues.put(attributeIndex, possibleValues);
+    }
+
+    /**
+     * Creates a new vertex from input parameters and adds it to the map of
+     * vertices with the archetypeIndex as the key.
+     *
+     * @param id             - ID of the vertex to add
+     * @param title          - Title of the vertex
+     * @param text           - Text of the vertex
+     * @param archetypeIndex - Type of archetype associated with this vertex
+     * @param attributes     - Map of attributes associated with the vertex
+     */
+    public void addVertex(int id, String title, String text, int archetypeIndex, Map<Integer, Attribute> attributes) {
+        VertexImpl vertexToAdd = new VertexImpl(id, id, title, archetypeIndex, text);
+        if (vertices.containsKey(archetypeIndex)) {
+            vertices.get(archetypeIndex).add(vertexToAdd);
+        } else {
+            HashSet<VertexImpl> vertexSet = new HashSet<>();
+            vertexSet.add(vertexToAdd);
+            vertices.put(archetypeIndex, vertexSet);
+        }
+
+        vertexToAdd.addAttributes(attributes);
+    }
+
+    /**
+     * Creates a new edge from input parameters and adds it to the map of
+     * edges with the archetypeIndex as the key.
+     *
+     * @param id            - ID of the edge to add
+     * @param from          - ID of the vertex the edge comes from
+     * @param to            - ID of the vertex the edge points to
+     * @param text          - Text of edge
+     * @param archetypeInfo - The archetype information associated with this edge
+     * @param attributes    - Map of attributes associated with the edge
+     */
+    public void addEdge(int id, int from, int to, String text, EdgeArchetypeInfo archetypeInfo, Map<Integer, Attribute> attributes) {
+        EdgeImpl edgeToAdd = new EdgeImpl(id, from, to, text, id, archetypeInfo.edgeArchetypeIndex);
+        edgeToAdd.addAttributes(attributes);
+
+        if (edges.containsKey(archetypeInfo)) {
+            edges.get(archetypeInfo).add(edgeToAdd);
+        } else {
+            List<EdgeImpl> edgesList = new ArrayList<>();
+            edgesList.add(edgeToAdd);
+            edges.put(archetypeInfo, edgesList);
+        }
+    }
+
+    /**
+     * returns the index of a given enum value in the list of the possible enum values
+     * @param value the enum value
+     * @return index in the list of possible enum values or -1 if the value is not in the list
+     */
+    public int getEnumValueIndex(int attributeTypeIndex, String value) {
+        int index = -1;
+        List<String> values = possibleEnumValues.get(attributeTypeIndex);
+        for (int i = 0; i < values.size(); i++) {
+            if (values.get(i).equals(value)) {
+                index = i;
+                break;
+            }
+        }
+        return index;
+    }
+
+    /**
+     * returns the index of an attribute with a given name in the attributeTypes list
+     * @param name the name of the attribute
+     * @return the attribute index or -1 if there is no attribute with such a name
+     */
+    public int getAttributeIndex(String name) {
+        int index = -1;
+        for (int i = 0; i < attributeTypes.size(); i++) {
+            if (attributeTypes.get(i).name.equals(name)) {
+                index = i;
+                break;
+            }
+        }
+        return index;
+    }
+
+    /**
+     * returns the index of an archetype with a given name in the vertexArchetypes list
+     * @param archetypeName name of the archetype
+     * @return the index or -1 if there is no archetype with the given name in the list
+     */
+    public int getVertexArchetypeIndex(String archetypeName) {
+        int index = -1;
+        for (int i = 0; i < vertexArchetypes.size(); i++) {
+            if (vertexArchetypes.get(i).name.equals(archetypeName)) {
+                index = i;
+                break;
+            }
+        }
+        return index;
+    }
+
+    /**
+     * returns the index of an archetype with a given name in the edgeArchetypes list
+     * @param archetypeName name of the archetype
+     * @return the index or -1 if there is no archetype with the given name in the list
+     */
+    public int getEdgeArchetypeIndex(String archetypeName) {
+        int index = -1;
+        for (int i = 0; i < edgeArchetypes.size(); i++) {
+            if (edgeArchetypes.get(i).name.equals(archetypeName)) {
+                index = i;
+                break;
+            }
+        }
+        return index;
+    }
+
+    /**
+     * Filters the edges and vertices according to the default filter loaded from the configuration file
+     * and constructs the {@code Graph} object.
+     * @param configLoader - The object that loads the configuration file.
+     * @return - Constructed {@code Graph} object.
+     */
+    public Graph createGraph(JSONConfigLoader configLoader) {
+        Graph graph = new Graph();
+
+        // To use default filter from a configuration file
+        GraphFilter filter = configLoader.loadDefaultFilter();
+        if (filter == null) {
+            // To Enable Everything
+            filter = new GraphFilter();
+            filter.setVertexArchetypeFilter(new ArrayList<Integer>(), GraphFilter.ArchetypeMatchType.NON_MATCHING);
+            filter.setEdgeArchetypeFilter(new ArrayList<EdgeArchetypeInfo>(), GraphFilter.ArchetypeMatchType.NON_MATCHING);
+        }
+
+        Map<String, String> archetypeIcons = configLoader.loadArchetypeIcons();
+        graph.setArchetypeIcons(archetypeIcons);
+
+        List<String> defaultGroupArchetypes = configLoader.loadGroupArchetypesStrings();
+        graph.setDefaultGroupArchetypes(defaultGroupArchetypes);
+
+
+
+
+        Set<VertexImpl> resultVertices = getVerticesByArchetypeFilter(filter);
+
+        resultVertices = getVerticesByAttributeFilter(filter, resultVertices);
+
+        List<EdgeImpl> resultEdges = getEdgesByArchetypeFilter(filter, resultVertices);
+
+        resultEdges = getEdgesByAttributeFilter(filter, resultEdges);
+
+        addVerticesToGraph(graph, resultVertices);
+
+        addEdgesToGraph(graph, resultEdges);
+
+        graph.setAttributeTypes(attributeTypes);
+        graph.setPossibleEnumValues(possibleEnumValues);
+
+        graph.setGraphState(createGraphState(graph));
+
+        return graph;
+    }
+
+    /**
+     * Gets filtered vertices by attributes.
+     * @param filter - Filter object.
+     * @param vertices - List of vertices for filtration.
+     * @return - List of vertices filtered by attribute.
+     */
+    private Set<VertexImpl> getVerticesByAttributeFilter(GraphFilter filter, Set<VertexImpl> vertices) {
+        Set<VertexImpl> resultVertices = new HashSet<>();
+        for (VertexImpl vertex : vertices) {
+            boolean filterPassed = true;
+            AttributeFilter attributeFilter = filter.getVertexAttributeFilter(vertex.getArchetype());
+            if (attributeFilter != null) {
+                // Iterate through all attributes of the vertex
+                for (int attributeIndex : vertex.getAttributesMap().keySet()) {
+                    Attribute vertexAttribute = vertex.getAttributesMap().get(attributeIndex);
+
+                    filterPassed = (filterPassed && checkAttributeFiltersPassed(vertexAttribute, attributeFilter, attributeIndex));
+                    if (!filterPassed) break;   // filter did not pass
+                }
+            }
+            if (filterPassed)
+                resultVertices.add(vertex);
+        }
+        return resultVertices;
+    }
+
+    /**
+     * Gets filtered edges by attribute.
+     * @param filter - Filter object.
+     * @param edges - List of edges for filtration.
+     * @return - List of edges filtered by attribute.
+     */
+    private List<EdgeImpl> getEdgesByAttributeFilter(GraphFilter filter, List<EdgeImpl> edges) {
+        List<EdgeImpl> resultEdges = new ArrayList<>();
+        for (EdgeImpl edge : edges) {
+            boolean filterPassed = true;
+            AttributeFilter attributeFilter = filter.getEdgeAttributeFilter(edge.getArchetype());
+            if (attributeFilter != null) {
+                // Iterate through all attributes of the edge
+                for (int attributeIndex : edge.getAttributesMap().keySet()) {
+                    Attribute edgeAttribute = edge.getAttributesMap().get(attributeIndex);
+
+                    filterPassed = (filterPassed && checkAttributeFiltersPassed(edgeAttribute, attributeFilter, attributeIndex));
+                    if (!filterPassed) break;   // filter did not pass
+                }
+            }
+            if (filterPassed)
+                resultEdges.add(edge);
+        }
+
+        return resultEdges;
+    }
+
+    /**
+     * Filters the attribute by its attribute filters and checks if it passed.
+     * @param vertexAttribute - Attribute object to filter.
+     * @param attributeFilter - Attribute filter of the attribute.
+     * @param attributeIndex - Index of the attribute.
+     * @return - true if passed the filter, else false.
+     */
+    private boolean checkAttributeFiltersPassed(Attribute vertexAttribute, AttributeFilter attributeFilter, int attributeIndex) {
+        AttributeDataType attributeType = attributeTypes.get(vertexAttribute.getTypeIndex()).dataType;
+
+        boolean filterPassed;
+        ITypeAttributeFilter typeFilter = null;
+        switch (attributeType) {
+            case NUMBER:
+                typeFilter = attributeFilter.getNumberFilter(attributeIndex);
+                break;
+            case DATE:
+                typeFilter = attributeFilter.getDateFilter(attributeIndex);
+                break;
+            case ENUM:
+                typeFilter = attributeFilter.getEnumFilter(attributeIndex);
+                break;
+            case STRING:
+                typeFilter = attributeFilter.getStringFilter(attributeIndex);
+                break;
+        }
+        if (typeFilter == null) { // No filters mean pass
+            return true;
+        }
+
+        filterPassed = typeFilter.filter(vertexAttribute.getValue());
+
+        return filterPassed;
+    }
+
+    /**
+     * Filters vertices by archetype from the specified filter object.
+     *
+     * @param filter - Filter to be applied to the vertices.
+     * @return A list of vertices filtered by the specified filter object.
+     */
+    private HashSet<VertexImpl> getVerticesByArchetypeFilter(GraphFilter filter) {
+        HashSet<VertexImpl> resultVertices = new HashSet<>();
+
+        VertexArchetypeFilter vertexArchetypeFilter = filter.getVertexArchetypeFilter();
+        List<Integer> archetypesFiltered = vertexArchetypeFilter.archetypeIndeces;
+        switch (vertexArchetypeFilter.matchType) {
+            case MATCHING:
+                for (Integer vertexArchetypeIndex : vertices.keySet()){
+                    if (archetypesFiltered.contains(vertexArchetypeIndex)) {
+                        resultVertices.addAll(vertices.get(vertexArchetypeIndex));
+                    }
+                }
+                break;
+            case NON_MATCHING:
+                for (Integer vertexArchetypeIndex : vertices.keySet()){
+                    if (!archetypesFiltered.contains(vertexArchetypeIndex)) {
+                        resultVertices.addAll(vertices.get(vertexArchetypeIndex));
+                    }
+                }
+                break;
+        }
+
+        return resultVertices;
+    }
+
+    /**
+     * Filters edges by archetype from the specified filter object. Also removes all edges that contain either a vertex
+     * from which the edge originates or to which the edge leads.
+     *
+     * @param filter         - Filter to be applied to the edges list.
+     * @param resultVertices - List of vertices which should be present in the result graph.
+     * @return A list of edges filtered by the specified filter object
+     */
+    private List<EdgeImpl> getEdgesByArchetypeFilter(GraphFilter filter, Set<VertexImpl> resultVertices) {
+        List<EdgeImpl> resultEdges = new ArrayList<>();
+
+        EdgeArchetypeFilter edgeArchetypeFilter = filter.getEdgeArchetypeFilter();
+        List<EdgeArchetypeInfo> edgeInfosFiltered = edgeArchetypeFilter.archetypeIndeces;
+        switch (edgeArchetypeFilter.matchType) {
+            case MATCHING:
+                for (EdgeArchetypeInfo edgeInfo : edges.keySet()){
+                    if (edgeInfosFiltered.contains(edgeInfo)) {
+                        resultEdges.addAll(edges.get(edgeInfo));
+                    }
+                }
+                break;
+            case NON_MATCHING:
+                for (EdgeArchetypeInfo edgeInfo : edges.keySet()){
+                    if (!edgeInfosFiltered.contains(edgeInfo)) {
+                        resultEdges.addAll(edges.get(edgeInfo));
+                    }
+                }
+                break;
+        }
+
+        Iterator<EdgeImpl> i = resultEdges.iterator();
+        while (i.hasNext()) {
+            EdgeImpl edge = i.next();
+
+            VertexImpl toDummy = new VertexImpl(edge.getTo(), edge.getTo(), null, -1,null);
+            VertexImpl fromDummy = new VertexImpl(edge.getFrom(), edge.getFrom(), null, -1, null);
+
+            if (!resultVertices.contains(toDummy) || !resultVertices.contains(fromDummy)){
+                i.remove();
+            }
+        }
+
+        return resultEdges;
+    }
+
+    /**
+     * Adds edges to graph.
+     *
+     * Edges are equal when their attributes from and to are equal. Equal edges are combined and their differences
+     * are saved in list of SubedgeInfo.
+     *
+     * @param graph - graph to which add the edges
+     * @param resultEdges - List of edges to add to the graph.
+     */
+    private void addEdgesToGraph(Graph graph, List<EdgeImpl> resultEdges) {
+        HashMap<EdgeImpl, List<SubedgeInfo>> edgeSet = new HashMap<>();
+
+        for (EdgeImpl edgeImpl : resultEdges) {
+            List<String[]> attributes = getAttributesAsArray(edgeImpl.getSortedAttributes());
+            SubedgeInfo subedgeInfo = new SubedgeInfo(edgeImpl.getOriginalId(), edgeImpl.getArchetype(), attributes);
+
+            if (edgeSet.containsKey(edgeImpl)) {
+                edgeSet.get(edgeImpl).add(subedgeInfo);
+            } else {
+                List<SubedgeInfo> subEdgeInfoList = new ArrayList<>();
+                subEdgeInfoList.add(subedgeInfo);
+                edgeSet.put(edgeImpl, subEdgeInfoList);
+            }
+        }
+
+        int idCounter = 1;
+        for (EdgeImpl edgeImpl : edgeSet.keySet()) {
+            Edge edge = new Edge(idCounter++, edgeImpl.getFrom(), edgeImpl.getTo(), edgeImpl.getText(), edgeSet.get(edgeImpl));
+            graph.addEdge(edge);
+        }
+        graph.setVertexArchetypes(vertexArchetypes);
+        graph.setEdgeArchetypes(edgeArchetypes);
+    }
+
+    /**
+     * Adds vertices to the graph.
+     * @param graph - Graph to which add the vertices.
+     * @param resultVertices - List of vertices to add to the graph.
+     */
+    private void addVerticesToGraph(Graph graph, Set<VertexImpl> resultVertices) {
+        for (VertexImpl vertexImpl : resultVertices) {
+
+            VertexArchetype archetype = vertexArchetypes.get(vertexImpl.getArchetype());
+            String title = archetype.name + ":" + vertexImpl.getTitle();
+            List<String[]> attributes = getAttributesAsArray(vertexImpl.getSortedAttributes());
+
+            Vertex vertex = new Vertex(lastVertexOrGroupId++, vertexImpl.getOriginalId(), title, vertexImpl.getArchetype(), vertexImpl.getText(), attributes);
+
+            graph.addVertex("" + vertexImpl.getId(), vertex);
+        }
+    }
+
+    private List<String[]> getAttributesAsArray(List<Attribute> sortedAttributes) {
+        ArrayList<String[]> attributes = new ArrayList<>();
+
+        for (Attribute attr : sortedAttributes) {
+            String attrName = attributeTypes.get(attr.getTypeIndex()).name;
+            AttributeDataType attrType = attributeTypes.get(attr.getTypeIndex()).dataType;
+
+            StringBuilder attrValue = getAttributeValue(attr, attrType);
+            attributes.add(new String[]{attrName, attrValue.toString()});
+        }
+        return attributes;
+    }
+
+    /**
+     * Gets the string value of attribute by its data type.
+     * @param attr - Attribute object from which to extract the value.
+     * @param attrType - Data type of the attribute.
+     * @return - String value of the attribute.
+     */
+    private StringBuilder getAttributeValue(Attribute attr, AttributeDataType attrType) {
+        StringBuilder attrValue;
+        switch (attrType) {
+            case NUMBER:
+                attrValue = new StringBuilder(attr.getValue().toString());
+                break;
+            case DATE:
+                attrValue = new StringBuilder(attr.getValue().toString());
+                break;
+            case ENUM: // Enum attribute type must be a list of integers!
+                List<Integer> valuePositions = (List<Integer>) attr.getValue();
+                List<String> values = getEnumStringsForAttrIndex(attr.getTypeIndex(), valuePositions);
+
+                attrValue = new StringBuilder();
+                for (int j = 0; j < values.size(); j++) {
+                    attrValue.append(values.get(j));
+                    if (j < values.size() - 1)
+                        attrValue.append(", ");
+                }
+                break;
+            default:
+                attrValue = new StringBuilder(attr.getValue().toString());
+                break;
+        }
+        return attrValue;
+    }
+
+    /**
+     * Method is used for initialization of default graph status based on input graph.
+     *
+     * @param graph graph where are set vertices, defaultGroupArchetypes and vertexArchetypes.
+     * @return instance of created GraphState
+     */
+    private GraphState createGraphState(Graph graph) {
+        GraphState state = new GraphState();
+
+        state.addGroupsAll(createDefaultGroups(graph));
+
+
+        return state;
+    }
+
+    /**
+     * Method create list of groups based on defaultGroupArchetypes whose are defined in graph. Vertices are taken
+     * from graph too.
+     *
+     * @param graph graph from which are groups created.
+     * @return created list of groups or empty list.
+     */
+    private Collection<Group> createDefaultGroups(Graph graph){
+
+        Map<Integer, Group> groups = new HashMap<>();
+        int groupId = 1;
+
+        // find index of vertex archetypes names
+        int index = 0;
+        for(VertexArchetype archetype : graph.getVertexArchetypes()){
+            if(graph.getDefaultGroupArchetypes().contains(archetype.name)){
+                groups.put(index, new Group(groupId++, lastVertexOrGroupId++, archetype.name));
+            }
+            index++;
+        }
+
+        // find vertices with founded vertex archetypes indices
+        for (Vertex vertex : graph.getVertices().values()){
+            if(groups.keySet().contains(vertex.getArchetype())){
+                groups.get(vertex.getArchetype()).addVertexId(vertex.getId());
+            }
+        }
+
+        // remove groups without vertices
+        List<Group> groupList = new ArrayList<>();
+        for(Group group : groups.values()){
+            if (!group.getVerticesId().isEmpty()){
+                groupList.add(group);
+            }
+        }
+
+        return groupList;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/GraphState.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/GraphState.java
new file mode 100644
index 0000000..00bb25e
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/GraphState.java
@@ -0,0 +1,71 @@
+package cz.zcu.kiv.offscreen.graph;
+
+import cz.zcu.kiv.offscreen.api.Group;
+import cz.zcu.kiv.offscreen.api.Position;
+import cz.zcu.kiv.offscreen.api.SideBar;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class GraphState {
+
+    private List<Group> groups = new ArrayList<>();
+    private List<Position> positions = new ArrayList<>();
+    private List<SideBar> sideBar = new ArrayList<>();
+    private int selectedVertex;
+    private int selectedEdge;
+
+
+    public List<Group> getGroups() {
+        return groups;
+    }
+
+    public List<Position> getPositions() {
+        return positions;
+    }
+
+    public List<SideBar> getSideBar() {
+        return sideBar;
+    }
+
+    public int getSelectedVertex() {
+        return selectedVertex;
+    }
+
+    public int getSelectedEdge() {
+        return selectedEdge;
+    }
+
+    public void addGroup(Group group){
+        this.groups.add(group);
+    }
+
+    public void addPosition(Position position){
+        this.positions.add(position);
+    }
+
+    public void addSideBar(SideBar sideBar){
+        this.sideBar.add(sideBar);
+    }
+
+    public void addGroupsAll(Collection<Group> collection){
+        this.groups.addAll(collection);
+    }
+
+    public void addPositionsAll(Collection<Position> collection){
+        this.positions.addAll(collection);
+    }
+
+    public void addSideBarsAll(Collection<SideBar> collection){
+        this.sideBar.addAll(collection);
+    }
+
+    public void setSelectedVertex(int selectedVertex) {
+        this.selectedVertex = selectedVertex;
+    }
+
+    public void setSelectedEdge(int selectedEdge) {
+        this.selectedEdge = selectedEdge;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/VertexArchetype.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/VertexArchetype.java
new file mode 100644
index 0000000..f29d35c
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/VertexArchetype.java
@@ -0,0 +1,19 @@
+package cz.zcu.kiv.offscreen.graph;
+
+public class VertexArchetype {
+    public String name;
+    public String text;
+
+    VertexArchetype(String name, String text) {
+        this.name = name;
+        this.text = text;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getText() {
+        return text;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/VertexImpl.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/VertexImpl.java
new file mode 100644
index 0000000..4c6a7bb
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/VertexImpl.java
@@ -0,0 +1,58 @@
+package cz.zcu.kiv.offscreen.graph;
+
+import cz.zcu.kiv.offscreen.api.BaseVertex;
+import java.util.*;
+
+/**
+ * Class represents vertex which is used for input JSON format.
+ */
+public class VertexImpl extends BaseVertex {
+
+    /** Map contains attributes stored in key value format. Key is index to array of attribute types defined in input file */
+    private Map<Integer, Attribute> attributesMap;
+
+    /**
+     * Creates new vertex.
+     * @param id new generated identification number.
+     * @param originalId original identification number from input file
+     * @param title title of vertex
+     * @param archetypeIndex index of vertex archetype
+     * @param text additional info
+     */
+    public VertexImpl(int id, int originalId, String title, int archetypeIndex, String text) {
+        super(id, originalId, title, archetypeIndex, text);
+        this.attributesMap = new HashMap<>();
+    }
+
+    public void addAttribute(int attrTypeIndex, Object value) {
+        Attribute attr = new Attribute(attrTypeIndex, value);
+        attributesMap.put(attrTypeIndex, attr);
+    }
+
+    public void addAttributes(Map<Integer, Attribute> attributes) {
+        this.attributesMap.putAll(attributes);
+    }
+
+    public Attribute getAttribute(int attrTypeIndex) {
+        return attributesMap.get(attrTypeIndex);
+    }
+
+    public Map<Integer, Attribute> getAttributesMap(){
+        return attributesMap;
+    }
+
+    /**
+     * Return list of attributes sorted by their key value in {@code attributeMap}
+     * @return sorted list
+     */
+    public List<Attribute> getSortedAttributes() {
+        List<Attribute> list = new ArrayList<>();
+        ArrayList<Integer> indices = new ArrayList<>(attributesMap.keySet());
+        //indices.sort(Integer::compareTo);
+        Collections.sort(indices);
+        for (int index : indices) {
+            list.add(attributesMap.get(index));
+        }
+        return list;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/creator/EfpGraphTransfomer.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/creator/EfpGraphTransfomer.java
new file mode 100644
index 0000000..fb8f0eb
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/creator/EfpGraphTransfomer.java
@@ -0,0 +1,397 @@
+//package cz.zcu.kiv.offscreen.graph.creator;
+//
+//import java.util.ArrayList;
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+//import org.apache.log4j.Logger;
+//
+//import cz.zcu.kiv.efps.comparator.result.EfpEvalResult.MatchingResult;
+//import cz.zcu.kiv.offscreen.api.EdgeInterface;
+//import cz.zcu.kiv.offscreen.api.GraphInterface;
+//import cz.zcu.kiv.offscreen.api.VertexInterface;
+//import cz.zcu.kiv.offscreen.data.efpportal.CocaexData;
+//import cz.zcu.kiv.offscreen.data.efpportal.CocaexDataEfp;
+//import cz.zcu.kiv.offscreen.data.efpportal.CocaexDataFeature;
+//import cz.zcu.kiv.offscreen.data.efpportal.CocaexWrapper;
+//import cz.zcu.kiv.offscreen.graph.EdgeEfp;
+//import cz.zcu.kiv.offscreen.graph.GraphImpl;
+//import cz.zcu.kiv.offscreen.graph.VertexEfp;
+//import cz.zcu.kiv.offscreen.graph.efp.EfpComparison;
+//import cz.zcu.kiv.offscreen.graph.efp.EfpFeature;
+//
+///**
+// *
+// * Transforms data obtained in form of Map<String, CocaexData> to
+// * cz.zcu.kiv.offscreen.api.GraphInterface.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class EfpGraphTransfomer {
+//
+//	private final String DELIMITER = ";";
+//
+//	/**
+//	 * Output data format.
+//	 */
+//	private GraphInterface graph = null;
+//
+//	/**
+//	 * Input data format.
+//	 */
+//	private Map<String, CocaexData> resultData = null;
+//
+//	private Map<String, String> resultFeaturesMapping = null;
+//
+//	private Map<String, String> resultEfpsMapping = null;
+//
+//	/**
+//	 * Already used vertices.
+//	 */
+//	private Map<String, VertexInterface> vertexMap;
+//
+//	/**
+//	 * Already used features.
+//	 */
+//	private Map<String, EfpFeature> featureMap;
+//
+//	/**
+//	 * Logging.
+//	 */
+//	private Logger logger = Logger.getLogger(EfpGraphTransfomer.class);
+//
+//	/**
+//	 * New transformer from input data.
+//	 *
+//	 * @param efpportalResultsWrapper
+//	 *            Input data in from of EfpPortal app.
+//	 */
+//	public EfpGraphTransfomer(CocaexWrapper efpportalResultsWrapper) {
+//		logger.trace("ENTRY");
+//		this.graph = new GraphImpl();
+//
+//		this.resultData = efpportalResultsWrapper.getData();
+//		this.resultEfpsMapping = efpportalResultsWrapper.getEfpMappings();
+//		this.resultFeaturesMapping = efpportalResultsWrapper
+//				.getFeatureMappings();
+//
+//		this.vertexMap = new HashMap<String, VertexInterface>();
+//		this.featureMap = new HashMap<String, EfpFeature>();
+//
+//		logger.trace("EXIT");
+//	}
+//
+//	/**
+//	 * Generates the graph with vertices and edges.
+//	 *
+//	 * @return graph
+//	 */
+//	public GraphInterface transform() {
+//		logger.trace("ENTRY");
+//		this.generateVertices();
+//		this.generateEdges();
+//
+//		// set proper feature and efp names
+//		this.setNamesInsteadOfNumbers();
+//		logger.trace("EXIT");
+//
+//		return this.graph;
+//	}
+//
+//	/**
+//	 * Substitute ID for the proper name string.
+//	 */
+//	private void setNamesInsteadOfNumbers() {
+//		logger.trace("ENTRY");
+//
+//		List<EdgeInterface> edges = graph.getEdges();
+//
+//		for (EdgeInterface edgeInterface : edges) {
+//			ArrayList<EfpFeature> features = ((EdgeEfp) edgeInterface)
+//					.getFeatures();
+//
+//			for (EfpFeature efpFeature : features) {
+//				// substitute ID for the true name from the feature mapping
+//				String tmpFeatureName = resultFeaturesMapping.get(efpFeature.getName());
+//
+//				efpFeature.setName(tmpFeatureName.split(DELIMITER)[1]);
+//
+//				ArrayList<EfpComparison> efps = efpFeature.getEfps();
+//
+//				for (EfpComparison efpComparison : efps) {
+//					// substitute ID for the true name from the efps mapping
+//					efpComparison.setEfpName(resultEfpsMapping
+//							.get(efpComparison.getEfpName()));
+//				}
+//			}
+//		}
+//
+//		logger.trace("EXIT");
+//	}
+//
+//	/**
+//	 * Generate vertices for this graph.
+//	 */
+//	private void generateVertices() {
+//		logger.trace("ENTRY");
+//
+//		int id = 0;
+//		VertexEfp vertex;
+//
+//		for (Map.Entry<String, CocaexData> tmpData : resultData.entrySet()) {
+//			id++;
+//
+//			vertex = new VertexEfp(id, tmpData.getKey(), tmpData.getKey());
+//
+//			this.graph.addVertex(tmpData.getKey(), vertex);
+//			this.vertexMap.put(tmpData.getKey(), vertex);
+//		}
+//
+//		logger.trace("EXIT");
+//	}
+//
+//	/**
+//	 * Generate edges for this graph.
+//	 */
+//	private void generateEdges() {
+//		logger.trace("ENTRY");
+//
+//		int id = 0;
+//		String from, to;
+//		CocaexData currentEvaluatedVertexData;
+//
+//		for (Map.Entry<String, VertexInterface> currentVertex : vertexMap
+//				.entrySet()) {
+//			currentEvaluatedVertexData = resultData.get(currentVertex.getKey());
+//
+//			to = currentVertex.getKey();
+//
+//			// all required features FROM
+//			for (Map.Entry<String, CocaexDataFeature> tmpRequired : currentEvaluatedVertexData
+//					.getRequiredFeatures().entrySet()) {
+//
+//				String requiredFeatureName = this.resultFeaturesMapping
+//						.get(tmpRequired.getKey());
+//
+//				// get feature name, its first part is component name
+//				String[] requiredSplits = requiredFeatureName.split(DELIMITER);
+//
+//				// not-connected ones are left over
+//				if (!requiredSplits[0].isEmpty()) {
+//
+//					// vertex from == vertex to -> we dont want that...
+//					if (requiredSplits[0].equals(currentVertex.getKey())) {
+//						continue;
+//					}
+//
+//					// find corresponding feature on the TO vertex
+//					CocaexData otherVertexData = resultData
+//							.get(requiredSplits[0]);
+//					CocaexDataFeature otherVertexFeature = null;
+//
+//					// go through all features of the TO
+//					for (Map.Entry<String, CocaexDataFeature> tmpProvided : otherVertexData
+//							.getProvidedFeatures().entrySet()) {
+//						String providedFeatureName = this.resultFeaturesMapping
+//								.get(tmpProvided.getKey());
+//
+//						String[] providedSplits = providedFeatureName
+//								.split(DELIMITER);
+//
+//						// not-connected ones are left over
+//						if (providedSplits[0].isEmpty()) {
+//							continue;
+//						}
+//
+//						// found matching feature between TO and FROM
+//						if (providedSplits[0].equals(currentVertex.getKey())
+//								&& providedSplits[1].equals(requiredSplits[1])) {
+//							otherVertexFeature = tmpProvided.getValue();
+//						}
+//					}
+//
+//					from = requiredSplits[0];
+//
+//					EdgeEfp edge = findEdgeInGraph(from, to);
+//
+//					// add new edge
+//					if (edge == null) {
+//						edge = new EdgeEfp(++id, from, to);
+//						// from to
+//						checkAddEdgeFeature(tmpRequired.getValue(),
+//								otherVertexFeature, tmpRequired.getKey(), edge);
+//
+//						this.graph.addEdge(edge);
+//					} else {
+//						// add a feature to an old edge only
+//						checkAddEdgeFeature(tmpRequired.getValue(),
+//								otherVertexFeature, tmpRequired.getKey(), edge);
+//					}
+//				}
+//
+//			}
+//		}
+//
+//		logger.trace("EXIT");
+//	}
+//
+//	/**
+//	 *
+//	 * Find an existing edge in graph.
+//	 *
+//	 * @param from
+//	 *            Name of start vertex.
+//	 * @param to
+//	 *            name of end vertex.
+//	 * @return Null if not found, edge otherwise.
+//	 */
+//	private EdgeEfp findEdgeInGraph(String from, String to) {
+//		logger.trace("ENTRY");
+//		List<EdgeInterface> tmpEdges = this.graph.getEdges();
+//
+//		for (EdgeInterface edge : tmpEdges) {
+//			// found old edge
+//			if (edge.getFrom().equals(from) && edge.getTo().equals(to)) {
+//				logger.trace("EXIT");
+//				return (EdgeEfp) edge;
+//			}
+//		}
+//
+//		logger.trace("EXIT");
+//		return null;
+//	}
+//
+//	/**
+//	 *
+//	 * Check and add feature to edge.
+//	 *
+//	 * @param requiredFeature
+//	 *            Required feature with EFPs.
+//	 * @param providedFeature
+//	 *            Provided feature with EFPs.
+//	 * @param name
+//	 *            Feature name.
+//	 * @param edge
+//	 *            Edge where the feature belongs.
+//	 */
+//	private void checkAddEdgeFeature(CocaexDataFeature requiredFeature,
+//			CocaexDataFeature providedFeature, String name, EdgeEfp edge) {
+//		logger.trace("ENTRY");
+//		EfpFeature tmpFeature = null;
+//
+//		// find out if the edge already has a features like the added one
+//		for (EfpFeature oldFeature : edge.getFeatures()) {
+//			// the edge contains the feature already
+//			if (oldFeature.getName().equals(name)) {
+//				tmpFeature = oldFeature;
+//				break;
+//			}
+//		}
+//
+//		// an old feature
+//		if (tmpFeature != null) {
+//			tmpFeature = featureMap.get(name);
+//
+//			processEfpsToFeature(requiredFeature, providedFeature, tmpFeature,
+//					edge);
+//		} else { // add new feature to edge
+//			tmpFeature = new EfpFeature(name);
+//
+//			// preset the OK state
+//			tmpFeature.setFeatureStatus(MatchingResult.OK.toString());
+//
+//			processEfpsToFeature(requiredFeature, providedFeature, tmpFeature,
+//					edge);
+//
+//			edge.getFeatures().add(tmpFeature);
+//			featureMap.put(name, tmpFeature);
+//		}
+//		logger.trace("EXIT");
+//	}
+//
+//	/**
+//	 *
+//	 * Prepare process of adding EFP values to existing feature.
+//	 *
+//	 * @param requiredFeature
+//	 *            Required feature with EFPs.
+//	 * @param providedFeature
+//	 *            Provided feature with EFPs.
+//	 * @param feature
+//	 *            Existing feature.
+//	 * @param edge
+//	 *            Edge where the EFPs with feature belong.
+//	 */
+//	private void processEfpsToFeature(CocaexDataFeature requiredFeature,
+//			CocaexDataFeature providedFeature, EfpFeature feature, EdgeEfp edge) {
+//		logger.trace("ENTRY");
+//
+//		MatchingResult result = checkAddFeatureEfp(requiredFeature,
+//				providedFeature, feature);
+//
+//		if (!result.equals(MatchingResult.OK)) {
+//			edge.setEdgeStatusOk(false);
+//			feature.setFeatureStatus(result.toString());
+//		}
+//
+//		logger.trace("EXIT");
+//	}
+//
+//	/**
+//	 *
+//	 * Check and add EFPs to an existing feature.
+//	 *
+//	 * @param requiredFeature
+//	 *            Required feature with EFPs.
+//	 * @param providedFeature
+//	 *            Provided feature with EFPs.
+//	 * @param feature
+//	 *            Existing feature.
+//	 * @return Result of EFPs comparison. OK/MISSING/ERROR
+//	 */
+//	private MatchingResult checkAddFeatureEfp(
+//			CocaexDataFeature requiredFeature,
+//			CocaexDataFeature providedFeature, EfpFeature feature) {
+//		logger.trace("ENTRY");
+//		final String defaultValue = "No value";
+//
+//		MatchingResult output = MatchingResult.OK;
+//
+//		// all EFPs bound to this feature
+//		for (int i = 0; i < requiredFeature.getEfps().size(); i++) {
+//			EfpComparison efpCmp = new EfpComparison();
+//
+//			CocaexDataEfp firstEfp = requiredFeature.getEfps().get(i);
+//			CocaexDataEfp secondEfp = providedFeature.getEfps().get(i);
+//
+//			// set real values
+//			if (firstEfp.getEfpValue() != null) {
+//				efpCmp.setLeftEfpValue(firstEfp.getEfpValue().toString());
+//			} else {
+//				efpCmp.setLeftEfpValue(defaultValue);
+//			}
+//
+//			if (secondEfp.getEfpValue() != null) {
+//				efpCmp.setRightEfpValue(secondEfp.getEfpValue().toString());
+//			} else {
+//				efpCmp.setRightEfpValue(defaultValue);
+//			}
+//
+//			efpCmp.setTypeName(firstEfp.getEfpValueTypeName());
+//			efpCmp.setEfpName(firstEfp.getEfpName());
+//			efpCmp.setComparisonStatus(firstEfp.getTypeError().name());
+//
+//			// at least one efp is not OK
+//			if (!firstEfp.getTypeError().equals(MatchingResult.OK)) {
+//				output = firstEfp.getTypeError();
+//			}
+//
+//			feature.getEfps().add(efpCmp);
+//		}
+//		logger.trace("EXIT");
+//
+//		return output;
+//	}
+//}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/creator/GraphGenerator.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/creator/GraphGenerator.java
new file mode 100644
index 0000000..06b43f6
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/creator/GraphGenerator.java
@@ -0,0 +1,96 @@
+//package cz.zcu.kiv.offscreen.graph.creator;
+//
+//import cz.zcu.kiv.offscreen.api.EdgeInterface;
+//import cz.zcu.kiv.offscreen.api.GraphInterface;
+//import cz.zcu.kiv.offscreen.api.VertexInterface;
+//import cz.zcu.kiv.offscreen.graph.EdgeImpl;
+//import cz.zcu.kiv.offscreen.graph.GraphImpl;
+//import cz.zcu.kiv.offscreen.graph.VertexImpl;
+//import java.security.InvalidParameterException;
+//import java.util.Random;
+//import org.apache.log4j.Logger;
+//
+///**
+// * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+// */
+//public class GraphGenerator {
+//
+//    private final int COUNT_OF_VERTICES;
+//    private final int COUNT_OF_EDGES;
+//    private GraphInterface graph;
+//    private boolean[][] conectionGraph;
+//
+//    private Logger logger = Logger.getLogger(GraphGenerator.class);
+//
+//    public GraphGenerator(int countOfVertices, int countOfEdges) {
+//        logger.trace("ENTRY");
+//        if (countOfVertices <= 0 || countOfEdges <= 0
+//                || countOfEdges > (countOfVertices * countOfVertices - countOfVertices)) {
+//            throw new InvalidParameterException("Count of edges is greater then count of possible edges.");
+//        }
+//        this.COUNT_OF_VERTICES = countOfVertices;
+//        this.COUNT_OF_EDGES = countOfEdges;
+//        this.graph = new GraphImpl();
+//        this.conectionGraph = new boolean[this.COUNT_OF_VERTICES][this.COUNT_OF_VERTICES];
+//        logger.trace("EXIT");
+//    }
+//
+//    /**
+//     * This method creates the vertices and adds them to the graph.
+//     */
+//    private void generateVertices() {
+//        logger.trace("ENTRY");
+//        VertexInterface vertex;
+//        String name;
+//
+//        for (int i = 0; i < this.COUNT_OF_VERTICES; i++) {
+//            name = "vertex " + (i + 1);
+//            vertex = new VertexImpl((i + 1), name, name);
+//            this.graph.addVertex(name, vertex);
+//        }
+//        logger.trace("EXIT");
+//    }
+//
+//    /**
+//     * Generates edges between randomly selected vertices and adds them to the
+//     * graph.
+//     */
+//    private void generateEdges() {
+//        logger.trace("ENTRY");
+//        Random rnd = new Random(10);
+//        int v1, v2;
+//        EdgeInterface edge;
+//        VertexImpl vertex1, vertex2;
+//        for (int i = 0; i < this.COUNT_OF_EDGES; i++) {
+//
+//            do {
+//                v1 = rnd.nextInt(this.COUNT_OF_VERTICES);
+//                v2 = rnd.nextInt(this.COUNT_OF_VERTICES);
+//            } while (v1 == v2 || this.conectionGraph[v1][v2] == true);
+//
+//            this.conectionGraph[v1][v2] = true;
+//
+//            vertex1 = (VertexImpl) this.graph.getVertices().get("vertex " + (v1 + 1));
+//            vertex2 = (VertexImpl) this.graph.getVertices().get("vertex " + (v2 + 1));
+//            edge = new EdgeImpl(i + 1, vertex1.getName(), vertex2.getName(), true, "");
+//            this.graph.addEdge(edge);
+////            vertex1.addEdge(edge);
+////            vertex2.addEdge(edge);
+//
+//        }
+//        logger.trace("EXIT");
+//    }
+//
+//    /**
+//     * Generates the graph with vertices and edges.
+//     *
+//     * @return graph
+//     */
+//    public GraphInterface generate() {
+//        logger.trace("ENTRY");
+//        generateVertices();
+//        generateEdges();
+//        logger.trace("EXIT");
+//        return this.graph;
+//    }
+//}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/creator/GraphMaker.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/creator/GraphMaker.java
new file mode 100644
index 0000000..f8701e9
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/creator/GraphMaker.java
@@ -0,0 +1,439 @@
+//package cz.zcu.kiv.offscreen.graph.creator;
+//
+//import cz.zcu.kiv.ccu.ApiCmpStateResult;
+//import cz.zcu.kiv.ccu.ApiInterCompatibilityResult;
+//import cz.zcu.kiv.jacc.cmp.JComparator;
+//import cz.zcu.kiv.jacc.javatypes.*;
+//import cz.zcu.kiv.offscreen.api.GraphInterface;
+//import cz.zcu.kiv.offscreen.api.VertexInterface;
+//import cz.zcu.kiv.offscreen.graph.EdgeImpl;
+//import cz.zcu.kiv.offscreen.graph.GraphImpl;
+//import cz.zcu.kiv.offscreen.graph.VertexImpl;
+//import cz.zcu.kiv.typescmp.CmpResult;
+//import cz.zcu.kiv.typescmp.CmpResultNode;
+//import cz.zcu.kiv.typescmp.CorrectionStrategy;
+//
+//import org.apache.log4j.Logger;
+//import org.json.JSONArray;
+//import org.json.JSONObject;
+//
+//import java.io.File;
+//import java.io.IOException;
+//import java.io.InputStream;
+//import java.util.*;
+//
+///**
+// * This class provides creation graph of the loaded bundle.
+// *
+// * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+// */
+//public class GraphMaker {
+//
+//    private GraphInterface graph;
+//    private Logger logger = Logger.getLogger(GraphMaker.class);
+//    private Map<String, VertexInterface> vertexMap;
+//    private String fileLocation;
+//    private int level;
+//
+//    private ApiInterCompatibilityResult comparisonResult;
+//    private File[] uploadedFiles;
+//    private Properties jaccMessages;
+//
+//    private static final String NOT_FOUND = "NOT_FOUND";
+//
+//    public GraphMaker(String fileLocation, ApiInterCompatibilityResult comparisonResult, File[] uploadedFiles) throws IOException {
+//        logger.trace("ENTRY");
+//        this.graph = new GraphImpl();
+//        this.fileLocation = fileLocation;
+//
+//        this.uploadedFiles = uploadedFiles;
+//        this.comparisonResult = comparisonResult;
+//        logger.trace("EXIT");
+//
+//        jaccMessages = new Properties();
+//        InputStream in = null;
+//        try {
+//            in = JComparator.class.getResourceAsStream("messages.properties");
+//            jaccMessages.load(in);
+//        } catch (IOException e) {
+//            logger.trace(e);
+//        } finally {
+//            if (in != null) {
+//                try {
+//                    in.close();
+//                } catch (IOException e) {
+//                    logger.trace(e);
+//                }
+//            }
+//        }
+//    }
+//
+//    /**
+//     * This method creates the vertices and adds them to the graph.
+//     */
+//    private void generateVertices() {
+//        logger.trace("ENTRY");
+//
+//        VertexImpl vertex;
+//        String name;
+//        String symbolicName;
+//        int id = 0;
+//        this.vertexMap = new HashMap<>();
+//
+//        for (File origin : this.uploadedFiles) {
+//            id++;
+//            symbolicName = createSymbolicName(origin.toString());
+//            name = origin.getName();
+//            vertex = new VertexImpl(id, name, symbolicName);
+//
+//            this.vertexMap.put(symbolicName, vertex);
+//            this.graph.addVertex(symbolicName, vertex);
+//        }
+//
+//        symbolicName = createSymbolicName(NOT_FOUND);
+//        vertex = new VertexImpl(++id, NOT_FOUND, symbolicName);
+//
+//        this.vertexMap.put(symbolicName, vertex);
+//        this.graph.addVertex(symbolicName, vertex);
+//
+//        logger.trace("EXIT");
+//    }
+//
+//    /**
+//     * This method creates the edges and adds them to the graph. Currently, only incompatible edges are created.
+//     */
+//    private void generateEdges() {
+//        logger.trace("ENTRY");
+//
+//        int id = 0;
+//
+//        // cyklus pres nekompatibilni komponenty (komponenta = jar soubor)
+//        Set<String> components = comparisonResult.getOriginsImportingIncompatibilities();
+//        for (String component : components) {
+//            String firstOrigin = "";
+//            String secondOrigin = "";
+//            String firstOriginNF = "";
+//            String secondOriginNF = "";
+//
+//            JSONArray incompatibleInfoJSON = new JSONArray();
+//            JSONArray notFoundInfoJSON = new JSONArray();
+//
+//            // cyklus pres nekompatibilni tridy
+//            Set<JClass> incompatibleClasses = comparisonResult.getClassesImportingIncompatibilities(component);
+//            for (JClass incompatibleClass : incompatibleClasses) {
+//                JSONArray incompatibilitiesJson = new JSONArray();
+//                JSONArray missingClassesJson = new JSONArray();
+//
+//                // cyklus pres samotne nekompatibility
+//                Set<ApiCmpStateResult> apiCmpResults = comparisonResult.getIncompatibleResults(incompatibleClass, component);
+//                for (ApiCmpStateResult apiCmpResult : apiCmpResults) {
+//                    this.level = 0;
+//
+//                    CmpResult<File> cmpResult = apiCmpResult.getResult();
+//
+//                    if (cmpResult.getSecondObject() != null) {
+//                        List<CmpResultNode> children = cmpResult.getChildren();
+//                        for (CmpResultNode child : children) {
+//                            incompatibilitiesJson.put(findIncompatibilityCause(child, ""));
+//                        }
+//
+//                        if (firstOrigin.equals("") && secondOrigin.equals("")) {
+//                            firstOrigin = cmpResult.getFirstObject().getName();
+//                            secondOrigin = cmpResult.getSecondObject().getName();
+//                        }
+//
+//                    } else {
+//                        List<CmpResultNode> children = cmpResult.getChildren();
+//                        for (CmpResultNode child : children) {
+//                            missingClassesJson.put(findIncompatibilityCause(child, ""));
+//                        }
+//
+//                        if (firstOriginNF.equals("") && secondOriginNF.equals("")) {
+//                            firstOriginNF = cmpResult.getFirstObject().getName();
+//                            secondOriginNF = NOT_FOUND;
+//                        }
+//                    }
+//                }
+//
+//                // incompatible class
+//                JSONObject incompatibleClassJson = new JSONObject();
+//                incompatibleClassJson.put("causedBy", incompatibleClass.getName());
+//                incompatibleClassJson.put("incomps", incompatibilitiesJson);
+//
+//                incompatibleInfoJSON.put(incompatibleClassJson);
+//
+//                // not found class
+//                JSONObject notFoundClassJson = new JSONObject();
+//                notFoundClassJson.put("causedBy", incompatibleClass.getName());
+//                notFoundClassJson.put("incomps", missingClassesJson);
+//
+//                notFoundInfoJSON.put(notFoundClassJson);
+//            }
+//
+//            if (!firstOrigin.equals("")) {
+//                id++;
+//                EdgeImpl edge = new EdgeImpl(id, createSymbolicName(firstOrigin), createSymbolicName(secondOrigin), false, incompatibleInfoJSON.toString());
+//                this.graph.addEdge(edge);
+//            }
+//
+//            if (!firstOriginNF.equals("")) {
+//                id++;
+//                EdgeImpl edge = new EdgeImpl(id, createSymbolicName(secondOriginNF), createSymbolicName(firstOriginNF), false, notFoundInfoJSON.toString());
+//                this.graph.addEdge(edge);
+//            }
+//        }
+//
+//        logger.trace("EXIT");
+//    }
+//
+//    /**
+//     * Create symbolic name.
+//     *
+//     * @param origin
+//     * @return Symbolic name.
+//     */
+//    private String createSymbolicName(String origin) {
+//        String location = this.fileLocation.replace("/", File.separator) + File.separator;
+//
+//        return "vertex_" + origin.replace(location, "");
+//    }
+//
+//    /**
+//     * Generates the graph with vertices and edges.
+//     *
+//     * @return graph
+//     */
+//    public GraphInterface generate() {
+//        logger.trace("ENTRY");
+//
+//        this.generateVertices();
+//        this.generateEdges();
+//
+//        logger.trace("EXIT");
+//
+//        return this.graph;
+//    }
+//
+//    /**
+//     * Recursive function for traversing tree with incompatibility information. Creates object serializable to JSON.
+//     *
+//     * @param cmpResultNode
+//     * @param corrStrategy
+//     */
+//    public JSONObject findIncompatibilityCause(CmpResultNode cmpResultNode, String corrStrategy) {
+//        Object o = cmpResultNode.getResult().getFirstObject();
+//
+//        // cause description
+//        JSONObject descriptionJson = new JSONObject();
+//        descriptionJson.put("level", this.level);
+//
+//        if (o instanceof JMethod) {
+//            descriptionJson.put("name", "M " + getMethodDeclaration(o));
+//        } else if (o instanceof JField) {
+//            descriptionJson.put("name", "F " + getFieldDeclaration(o));
+//        } else if (o instanceof HasName) {
+//            descriptionJson.put("name", this.jaccMessages.getProperty(cmpResultNode.getContentCode()) + ": " + ((HasName) o).getName());
+//        } else {
+//            descriptionJson.put("name", this.jaccMessages.getProperty(cmpResultNode.getContentCode()));
+//        }
+//
+//        descriptionJson.put("contentCode", cmpResultNode.getContentCode());
+//        descriptionJson.put("propertyName", this.jaccMessages.getProperty(cmpResultNode.getContentCode()));
+//        descriptionJson.put("isIncompCause", cmpResultNode.isIncompatibilityCause());
+//
+//        if (o instanceof JPackage) {
+//            descriptionJson.put("type", "package");
+//            descriptionJson.put("details", getPackageDetails((JPackage) o));
+//        } else if (o instanceof JClass) {
+//            descriptionJson.put("type", "class");
+//            descriptionJson.put("details", getClassDetails((JClass) o));
+//        } else if (o instanceof JMethod) {
+//            descriptionJson.put("type", "method");
+//            descriptionJson.put("details", getMethodDetails((JMethod) o));
+//        } else if (o instanceof JField) {
+//            descriptionJson.put("type", "field");
+//            descriptionJson.put("details", getFieldDetails((JField) o));
+//        }
+//
+//        // incompatibility details
+//        if (cmpResultNode.isIncompatibilityCause()) {
+//            if (!cmpResultNode.getResult().getInherentDiff().name().equals("DEL")) {
+//                if (o instanceof HasName) {
+//                    descriptionJson.put("objectNameFirst", ((HasName) o).getName());
+//                    descriptionJson.put("objectNameSecond", ((HasName) cmpResultNode.getResult().getSecondObject()).getName());
+//                } else {
+//                    descriptionJson.put("objectNameFirst", o.toString());
+//                    descriptionJson.put("objectNameSecond", cmpResultNode.getResult().getSecondObject().toString());
+//                }
+//            }
+//
+//            String incompName = this.getIncompatibilityName(cmpResultNode, corrStrategy);
+//            if (incompName.equals("")) {
+//                descriptionJson.put("incompName", "Incompatible " + this.jaccMessages.getProperty(cmpResultNode.getContentCode()) + " -> " + corrStrategy); //child.getResult().getStrategy().name();
+//            } else {
+//                descriptionJson.put("incompName", incompName + (cmpResultNode.getResult().getInherentDiff().name().equals("DEL") ? " is missing -> " + cmpResultNode.getResult().getStrategy().name() : ""));
+//            }
+//
+//            descriptionJson.put("strategy", cmpResultNode.getResult().getStrategy().name());
+//            descriptionJson.put("difference", cmpResultNode.getResult().getInherentDiff().name());
+//        }
+//
+//        // subtree
+//        JSONArray subtreeJson = new JSONArray();
+//        if (!cmpResultNode.getResult().childrenCompatible()) {
+//            this.level++;
+//
+//            List<CmpResultNode> children = cmpResultNode.getResult().getChildren();
+//            for (CmpResultNode child : children) {
+//                CorrectionStrategy strategy = this.level == 1 ? cmpResultNode.getResult().getStrategy() : child.getResult().getStrategy();
+//
+//                subtreeJson.put(findIncompatibilityCause(child, strategy.name()));
+//            }
+//
+//            this.level--;
+//        }
+//
+//
+//        JSONObject causeJson = new JSONObject();
+//        causeJson.put("desc", descriptionJson);
+//        causeJson.put("subtree", subtreeJson);
+//
+//        return causeJson;
+//    }
+//
+//    private JSONObject getPackageDetails(JPackage pakkage) {
+//        JSONObject detailsJson = new JSONObject();
+//        detailsJson.put("name", pakkage.getName());
+//
+//        return detailsJson;
+//    }
+//
+//    private JSONObject getClassDetails(JClass clazz) {
+//        JSONObject detailsJson = new JSONObject();
+//
+//        detailsJson.put("name", clazz.getShortName());
+//        detailsJson.put("package", clazz.getPackage().getName());
+//
+//        detailsJson.put("enum", clazz.isEnum());
+//        detailsJson.put("interface", clazz.isInterface());
+//        detailsJson.put("annotation", clazz.isAnnotation());
+//
+//        detailsJson.put("abstract", clazz.getModifiers().isAbstract());
+//        detailsJson.put("final", clazz.getModifiers().isFinal());
+//        detailsJson.put("static", clazz.getModifiers().isStatic());
+//
+//        return detailsJson;
+//    }
+//
+//    private JSONObject getMethodDetails(JMethod method) {
+//        JSONObject detailsJson = new JSONObject();
+//
+//        detailsJson.put("name", method.getName());
+//        detailsJson.put("returnType", method.getReturnType().getName());
+//        detailsJson.put("constructor", method.isConstructor());
+//
+//        List<JType> exceptionTypes = method.getExceptionTypes();
+//        JSONArray exceptionTypeNames = new JSONArray();
+//        for (JType type : exceptionTypes) {
+//            exceptionTypeNames.put(type.getName());
+//        }
+//        detailsJson.put("exceptions", exceptionTypeNames);
+//
+//        List<JType> parameterTypes = method.getParameterTypes();
+//        JSONArray parameterTypeNames = new JSONArray();
+//        for (JType type : parameterTypes) {
+//            parameterTypeNames.put(type.getName());
+//        }
+//        detailsJson.put("paramTypes", parameterTypeNames);
+//
+//        detailsJson.put("abstract", method.getModifiers().isAbstract());
+//        detailsJson.put("final", method.getModifiers().isFinal());
+//        detailsJson.put("static", method.getModifiers().isStatic());
+//        detailsJson.put("synchronized", method.getModifiers().isSynchronized());
+//
+//        return detailsJson;
+//    }
+//
+//    private JSONObject getFieldDetails(JField field) {
+//        JSONObject detailsJson = new JSONObject();
+//
+//        detailsJson.put("name", field.getName());
+//        detailsJson.put("type", field.getType().getName());
+//        detailsJson.put("initialValue", field.getInitialValue());
+//
+//        detailsJson.put("abstract", field.getModifiers().isAbstract());
+//        detailsJson.put("final", field.getModifiers().isFinal());
+//        detailsJson.put("static", field.getModifiers().isStatic());
+//
+//        return detailsJson;
+//    }
+//
+//    private String getShortName(String longName) {
+//        return longName.substring(longName.lastIndexOf('.') + 1);
+//    }
+//
+//    private String getMethodDeclaration(Object o) {
+//        String methodName = "";
+//        methodName += getShortName(((JMethod) o).getReturnType().getName());
+//        methodName += " " + ((JMethod) o).getName();
+//        methodName += "(";
+//        for (JType type : ((JMethod) o).getParameterTypes()) {
+//            methodName += getShortName(type.getName()) + ", ";
+//        }
+//        methodName = methodName.replaceAll(", $", "");
+//        methodName += ")";
+//        return methodName;
+//    }
+//
+//    private String getFieldDeclaration(Object o) {
+//        String fieldDeclaration = "";
+//        fieldDeclaration += getShortName(((JField) o).getType().getName());
+//        fieldDeclaration += " " + ((JField) o).getName();
+//        return fieldDeclaration;
+//    }
+//
+//    private String getIncompatibilityName(CmpResultNode child, String corrStrategy) {
+//        Object o = child.getResult().getFirstObject();
+//
+//        String incompName;
+//        switch (child.getContentCode()) {
+//            case "cmp.child.class":
+//                if (o instanceof HasName) {
+//                    incompName = "Class " + ((HasName) o).getName();
+//                } else {
+//                    incompName = "Class " + o.toString();
+//                }
+//                break;
+//            case "cmp.child.method.return.type":
+//                incompName = this.jaccMessages.getProperty(child.getContentCode()) + " different -> " + corrStrategy;
+//                break;
+//            case "cmp.child.method.param.type":
+//                if (o instanceof HasName) {
+//                    incompName = "Parameter " + getShortName(((HasName) o).getName()) + " different -> " + corrStrategy;
+//                } else {
+//                    incompName = "Parameter " + getShortName(o.toString()) + " different -> " + corrStrategy;
+//                }
+//                break;
+//            case "cmp.child.method.invocation":
+//                incompName = "Invoke Virtual" + " -> " + child.getResult().getStrategy().name();
+//                break;
+//            case "cmp.child.method":
+//                incompName = "<span class='entity'>M</span> " + getMethodDeclaration(o);
+//                break;
+//            case "cmp.child.constructor":
+//                incompName = "<span class='entity'>C</span> " + getMethodDeclaration(o);
+//                break;
+//            case "cmp.child.field":
+//                incompName = "<span class='entity'>F</span> " + getFieldDeclaration(o);
+//                break;
+//            case "cmp.child.modifier":
+//                incompName = "<span class='entity'>P</span> " + o.toString() + " -> " + corrStrategy;
+//                break;
+//            default:
+//                incompName = "";
+//                break;
+//        }
+//        return incompName;
+//    }
+//
+//}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/efp/EfpComparison.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/efp/EfpComparison.java
new file mode 100644
index 0000000..ac0b58c
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/efp/EfpComparison.java
@@ -0,0 +1,88 @@
+//package cz.zcu.kiv.offscreen.graph.efp;
+//
+//import org.apache.log4j.Logger;
+//
+///**
+// *
+// * Holds data of EFP comparison relation.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class EfpComparison {
+//
+//	/**
+//	 * Status of the EFP cmp. OK, MISSING, etc.
+//	 */
+//	private String comparisonStatus;
+//
+//	/**
+//	 * Name of the EFP cmp.
+//	 */
+//	private String efpName;
+//
+//	/**
+//	 * Values of the left and right side of cmp. relation.
+//	 */
+//	private String leftEfpValue, rightEfpValue;
+//
+//	/**
+//	 * Name of the type used for the EFP cmp. relation.
+//	 */
+//	private String typeName;
+//
+//	/**
+//	 * Logging.
+//	 */
+//	private Logger logger = Logger.getLogger(EfpComparison.class);
+//
+//	/**
+//	 * Construct new relation.
+//	 */
+//	public EfpComparison() {
+//		logger.trace("ENTRY");
+//
+//		logger.trace("EXIT");
+//	}
+//
+//	public String getComparisonStatus() {
+//		return comparisonStatus;
+//	}
+//
+//	public void setComparisonStatus(String comparisonStatus) {
+//		this.comparisonStatus = comparisonStatus;
+//	}
+//
+//	public String getTypeName() {
+//		return typeName;
+//	}
+//
+//	public void setTypeName(String typeName) {
+//		this.typeName = typeName;
+//	}
+//
+//	public String getLeftEfpValue() {
+//		return leftEfpValue;
+//	}
+//
+//	public void setLeftEfpValue(String leftEfpValue) {
+//		this.leftEfpValue = leftEfpValue;
+//	}
+//
+//	public String getRightEfpValue() {
+//		return rightEfpValue;
+//	}
+//
+//	public void setRightEfpValue(String rightEfpValue) {
+//		this.rightEfpValue = rightEfpValue;
+//	}
+//
+//	public String getEfpName() {
+//		return efpName;
+//	}
+//
+//	public void setEfpName(String efpName) {
+//		this.efpName = efpName;
+//	}
+//
+//}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/efp/EfpFeature.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/efp/EfpFeature.java
new file mode 100644
index 0000000..0af9b5b
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/efp/EfpFeature.java
@@ -0,0 +1,72 @@
+//package cz.zcu.kiv.offscreen.graph.efp;
+//
+//import java.util.ArrayList;
+//
+//import org.apache.log4j.Logger;
+//
+///**
+// *
+// * Holds data of a feature used in EFP relation.
+// *
+// * @author Jiri Loudil
+// *
+// */
+//public class EfpFeature {
+//
+//	/**
+//	 * Name of the feature.
+//	 */
+//	private String name = "";
+//
+//	/**
+//	 * List of EFPs connected to this particular feature.
+//	 */
+//	private ArrayList<EfpComparison> efps;
+//
+//	/**
+//	 * Status of the feture. OK, MISSING, etc.
+//	 */
+//	private String featureStatus = "";
+//
+//	/**
+//	 * Logging.
+//	 */
+//	private Logger logger = Logger.getLogger(EfpFeature.class);
+//
+//	/**
+//	 *
+//	 * Construct new named feature.
+//	 *
+//	 * @param name New feature name.
+//	 */
+//	public EfpFeature(String name) {
+//		logger.trace("ENTRY");
+//		this.name = name;
+//
+//		this.efps = new ArrayList<EfpComparison>();
+//		this.featureStatus = "";
+//
+//		logger.trace("EXIT");
+//	}
+//
+//	public ArrayList<EfpComparison> getEfps() {
+//		return efps;
+//	}
+//
+//	public String getFeatureStatus() {
+//		return featureStatus;
+//	}
+//
+//	public void setFeatureStatus(String featureStatus) {
+//		this.featureStatus = featureStatus;
+//	}
+//
+//	public String getName() {
+//		return name;
+//	}
+//
+//	public void setName(String name) {
+//		this.name = name;
+//	}
+//
+//}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/efp/EfpGraphicSettings.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/efp/EfpGraphicSettings.java
new file mode 100644
index 0000000..4781896
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/efp/EfpGraphicSettings.java
@@ -0,0 +1,31 @@
+package cz.zcu.kiv.offscreen.graph.efp;
+
+/**
+ * 
+ * @author Jiri Loudil
+ *
+ */
+public class EfpGraphicSettings {
+	private int minInterfaceDiameter, maxInterfaceDiameter;
+
+	public EfpGraphicSettings() {
+		
+	}
+
+	public int getMinInterfaceDiameter() {
+		return minInterfaceDiameter;
+	}
+
+	public void setMinInterfaceDiameter(int minInterfaceDiameter) {
+		this.minInterfaceDiameter = minInterfaceDiameter;
+	}
+
+	public int getMaxInterfaceDiameter() {
+		return maxInterfaceDiameter;
+	}
+
+	public void setMaxInterfaceDiameter(int maxInterfaceDiameter) {
+		this.maxInterfaceDiameter = maxInterfaceDiameter;
+	}
+
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/AttributeFilter.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/AttributeFilter.java
new file mode 100644
index 0000000..7dcda7b
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/AttributeFilter.java
@@ -0,0 +1,43 @@
+package cz.zcu.kiv.offscreen.graph.filter;
+
+import java.util.HashMap;
+
+public class AttributeFilter {
+    private HashMap<Integer, NumberAttributeFilter> numberFilters = new HashMap<Integer, NumberAttributeFilter>();
+    private HashMap<Integer, EnumAttributeFilter> enumFilters = new HashMap<Integer, EnumAttributeFilter>();
+    private HashMap<Integer, DateAttributeFilter> dateFilters = new HashMap<Integer, DateAttributeFilter>();
+    private HashMap<Integer, StringAttributeFilter> stringFilters = new HashMap<Integer, StringAttributeFilter>();
+
+
+    public void addNumberFilter(int attrTypeIndex, NumberAttributeFilter filter) {
+        numberFilters.put(attrTypeIndex, filter);
+    }
+
+    public NumberAttributeFilter getNumberFilter(int attrTypeIndex) {
+        return numberFilters.get(attrTypeIndex);
+    }
+
+    public void addEnumFilter(int attrTypeIndex, EnumAttributeFilter filter) {
+        enumFilters.put(attrTypeIndex, filter);
+    }
+
+    public EnumAttributeFilter getEnumFilter(int attrTypeIndex) {
+        return enumFilters.get(attrTypeIndex);
+    }
+
+    public void addDateFilter(int attrTypeIndex, DateAttributeFilter filter) {
+        dateFilters.put(attrTypeIndex, filter);
+    }
+
+    public DateAttributeFilter getDateFilter(int attrTypeIndex) {
+        return dateFilters.get(attrTypeIndex);
+    }
+
+    public void addStringFilter(int attrTypeIndex, StringAttributeFilter filter) {
+        stringFilters.put(attrTypeIndex, filter);
+    }
+
+    public StringAttributeFilter getStringFilter(int attrTypeIndex) {
+        return stringFilters.get(attrTypeIndex);
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/DateAttributeFilter.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/DateAttributeFilter.java
new file mode 100644
index 0000000..5296555
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/DateAttributeFilter.java
@@ -0,0 +1,57 @@
+package cz.zcu.kiv.offscreen.graph.filter;
+
+import java.util.Date;
+
+public class DateAttributeFilter implements ITypeAttributeFilter {
+    private Date min;
+    private Date max;
+    private boolean minInclusive;
+    private boolean maxInclusive;
+    private GraphFilter.DateMatchType matchType;
+
+    public DateAttributeFilter(Date min, Date max, boolean minInclusive, boolean maxInclusive, GraphFilter.DateMatchType matchType) {
+        this.min = min;
+        this.max = max;
+        this.minInclusive = minInclusive;
+        this.maxInclusive = maxInclusive;
+        this.matchType = matchType;
+    }
+
+    @Override
+    public boolean filter(Object value) {
+        Date date = (Date) value;
+        boolean result = false;
+
+        int cmpMin = -1;
+        int cmpMax = 1;
+
+        if (minInclusive) cmpMin = 0;
+        if (maxInclusive) cmpMax = 0;
+
+        if (min.compareTo(date) <= cmpMin && max.compareTo(date) >= cmpMax) {
+            result = true;
+        }
+
+        return (matchType == GraphFilter.DateMatchType.MATCHING) == result;
+    }
+
+    public Date getMin() {
+        return min;
+    }
+
+    public Date getMax() {
+        return max;
+    }
+
+    public boolean isMinInclusive() {
+        return minInclusive;
+    }
+
+    public boolean isMaxInclusive() {
+        return maxInclusive;
+    }
+
+    public GraphFilter.DateMatchType getMatchType() {
+        return matchType;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/EdgeArchetypeFilter.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/EdgeArchetypeFilter.java
new file mode 100644
index 0000000..cb5bcdf
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/EdgeArchetypeFilter.java
@@ -0,0 +1,15 @@
+package cz.zcu.kiv.offscreen.graph.filter;
+
+import cz.zcu.kiv.offscreen.graph.EdgeArchetypeInfo;
+
+import java.util.List;
+
+public class EdgeArchetypeFilter {
+    public List<EdgeArchetypeInfo> archetypeIndeces;
+    public GraphFilter.ArchetypeMatchType matchType;
+
+    public EdgeArchetypeFilter(List<EdgeArchetypeInfo> archetypeIndeces, GraphFilter.ArchetypeMatchType matchType) {
+        this.archetypeIndeces = archetypeIndeces;
+        this.matchType = matchType;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/EnumAttributeFilter.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/EnumAttributeFilter.java
new file mode 100644
index 0000000..1233ef7
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/EnumAttributeFilter.java
@@ -0,0 +1,61 @@
+package cz.zcu.kiv.offscreen.graph.filter;
+
+import java.util.List;
+
+public class EnumAttributeFilter implements ITypeAttributeFilter {
+    private List<Integer> valueIndices;
+    private GraphFilter.EnumMatchType matchType;
+
+    public EnumAttributeFilter(List<Integer> valueIndices, GraphFilter.EnumMatchType matchType) {
+        this.valueIndices = valueIndices;
+        this.matchType = matchType;
+    }
+
+    @Override
+    public boolean filter(Object value) {
+        boolean result = true;
+        List<Integer> val = (List<Integer>) value;
+
+        switch (matchType) {
+            case ANY:
+                for (int e : val) {
+                    if (valueIndices.contains(e)) {
+                        return true;
+                    }
+                }
+                result = false;
+                break;
+            case NONE:
+                for (int e : val) {
+                    if (valueIndices.contains(e)) {
+                        return false;
+                    }
+                }
+                result = true;
+                break;
+            case EXACT_MATCH:
+                for (int e : val) {
+                    if (!valueIndices.contains(e)) {
+                        return false;
+                    }
+                }
+                for (int e : valueIndices) {
+                    if (!val.contains(e)) {
+                        return false;
+                    }
+                }
+                result = true;
+                break;
+        }
+
+        return result;
+    }
+
+    public List<Integer> getValueIndices() {
+        return valueIndices;
+    }
+
+    public GraphFilter.EnumMatchType getMatchType() {
+        return matchType;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/GraphFilter.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/GraphFilter.java
new file mode 100644
index 0000000..ce36932
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/GraphFilter.java
@@ -0,0 +1,226 @@
+package cz.zcu.kiv.offscreen.graph.filter;
+
+import cz.zcu.kiv.offscreen.graph.EdgeArchetypeInfo;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+public class GraphFilter {
+    public enum ArchetypeMatchType {
+        /**
+         * accepts all the archetypes in the list
+         */
+        MATCHING,
+
+        /**
+         * accepts all the available archetypes except those in the list
+         */
+        NON_MATCHING
+    }
+
+    public enum NumberMatchType {
+        /**
+         * accepts all numbers that belong to the interval
+         */
+        MATCHING,
+
+        /**
+         * accepts all numbers that are outside the interval
+         */
+        NON_MATCHING
+    }
+
+    public enum EnumMatchType {
+        /**
+         * accepts when the attribute has at least one of the values in the list
+         */
+        ANY,
+
+        /**
+         * accepts when the attribute has none of the values in the list
+         */
+        NONE,
+
+        /**
+         * accepts when the attribute has the exact values as the values in the list and none other
+         */
+        EXACT_MATCH
+    }
+
+    public enum DateMatchType {
+        /**
+         * accepts all dates that belong to the interval
+         */
+        MATCHING,
+
+        /**
+         * accepts all dates that are outside the interval
+         */
+        NON_MATCHING
+    }
+
+    public enum StringMatchType {
+        /**
+         * accepts strings that have the exact filter value
+         */
+        EXACT_MATCH,
+
+        /**
+         * accepts strings that have any value different from the filter value
+         */
+        EXACT_MISMATCH,
+
+        /**
+         * accepts strings that contain the filter value as a substring
+         */
+        CONTAINING,
+
+        /**
+         * accepts strings that do not contain the filter value as s substring
+         */
+        NON_CONTAINING,
+
+        /**
+         * accepts strings that are accepted by the regular expression defined by the filter value
+         */
+        REGULAR_EXPRESSION
+    }
+
+    private VertexArchetypeFilter vertexArchetypeFilter;
+    private EdgeArchetypeFilter edgeArchetypeFilter;
+
+    /**
+     * key is the vertex archetype index, value is the filter object
+     */
+    private HashMap<Integer, AttributeFilter> vertexAttributeFilters = new HashMap<>();
+
+    /**
+     * key is the edge archetype index, value is the filter object
+     */
+    private HashMap<Integer, AttributeFilter> edgeAttributeFilters = new HashMap<Integer, AttributeFilter>();
+
+    public AttributeFilter getVertexAttributeFilter(int archetypeIndex) {
+        return vertexAttributeFilters.get(archetypeIndex);
+    }
+
+    public AttributeFilter getEdgeAttributeFilter(int archetypeIndex) {
+        return edgeAttributeFilters.get(archetypeIndex);
+    }
+
+    public VertexArchetypeFilter getVertexArchetypeFilter() {
+        return vertexArchetypeFilter;
+    }
+
+    public EdgeArchetypeFilter getEdgeArchetypeFilter() {
+        return edgeArchetypeFilter;
+    }
+
+    public void setVertexArchetypeFilter(List<Integer> archetypeIndices, ArchetypeMatchType matchType) {
+        vertexArchetypeFilter = new VertexArchetypeFilter(archetypeIndices, matchType);
+    }
+
+    public void setEdgeArchetypeFilter(List<EdgeArchetypeInfo> archetypeIndices, ArchetypeMatchType matchType) {
+        edgeArchetypeFilter = new EdgeArchetypeFilter(archetypeIndices, matchType);
+    }
+
+    public void setVertexNumberAttributeFilter(int archetypeIndex, int attributeTypeIndex, BigDecimal min, BigDecimal max, boolean minInclusive, boolean maxInclusive, NumberMatchType matchType) {
+        AttributeFilter filter;
+        if (vertexAttributeFilters.containsKey(archetypeIndex)) {
+            filter = vertexAttributeFilters.get(archetypeIndex);
+        } else {
+            filter = new AttributeFilter();
+            vertexAttributeFilters.put(archetypeIndex, filter);
+        }
+        filter.addNumberFilter(attributeTypeIndex, new NumberAttributeFilter(min, max, minInclusive, maxInclusive, matchType));
+    }
+
+    public void setEdgeNumberAttributeFilter(int archetypeIndex, int attributeTypeIndex, BigDecimal min, BigDecimal max, boolean minInclusive, boolean maxInclusive, NumberMatchType matchType) {
+        AttributeFilter filter;
+        if (edgeAttributeFilters.containsKey(archetypeIndex)) {
+            filter = edgeAttributeFilters.get(archetypeIndex);
+        } else {
+            filter = new AttributeFilter();
+            edgeAttributeFilters.put(archetypeIndex, filter);
+        }
+        filter.addNumberFilter(attributeTypeIndex, new NumberAttributeFilter(min, max, minInclusive, maxInclusive, matchType));
+    }
+
+    public void setVertexEnumAttributeFilter(int archetypeIndex, int attributeTypeIndex, List<Integer> valueIndices, EnumMatchType matchType) {
+        AttributeFilter filter;
+        if (vertexAttributeFilters.containsKey(archetypeIndex)) {
+            filter = vertexAttributeFilters.get(archetypeIndex);
+        } else {
+            filter = new AttributeFilter();
+            vertexAttributeFilters.put(archetypeIndex, filter);
+        }
+        filter.addEnumFilter(attributeTypeIndex, new EnumAttributeFilter(valueIndices, matchType));
+    }
+
+    public void setEdgeEnumAttributeFilter(int archetypeIndex, int attributeTypeIndex, List<Integer> valueIndices, EnumMatchType matchType) {
+        AttributeFilter filter;
+        if (edgeAttributeFilters.containsKey(archetypeIndex)) {
+            filter = edgeAttributeFilters.get(archetypeIndex);
+        } else {
+            filter = new AttributeFilter();
+            edgeAttributeFilters.put(archetypeIndex, filter);
+        }
+        filter.addEnumFilter(attributeTypeIndex, new EnumAttributeFilter(valueIndices, matchType));
+    }
+
+    public void setVertexDateAttributeFilter(int archetypeIndex, int attributeTypeIndex, Date min, Date max, boolean minInclusive, boolean maxInclusive, DateMatchType matchType) {
+        AttributeFilter filter;
+        if (vertexAttributeFilters.containsKey(archetypeIndex)) {
+            filter = vertexAttributeFilters.get(archetypeIndex);
+        } else {
+            filter = new AttributeFilter();
+            vertexAttributeFilters.put(archetypeIndex, filter);
+        }
+        filter.addDateFilter(attributeTypeIndex, new DateAttributeFilter(min, max, minInclusive, maxInclusive, matchType));
+    }
+
+    public void setEdgeDateAttributeFilter(int archetypeIndex, int attributeTypeIndex, Date min, Date max, boolean minInclusive, boolean maxInclusive, DateMatchType matchType) {
+        AttributeFilter filter;
+        if (edgeAttributeFilters.containsKey(archetypeIndex)) {
+            filter = edgeAttributeFilters.get(archetypeIndex);
+        } else {
+            filter = new AttributeFilter();
+            edgeAttributeFilters.put(archetypeIndex, filter);
+        }
+        filter.addDateFilter(attributeTypeIndex, new DateAttributeFilter(min, max, minInclusive, maxInclusive, matchType));
+    }
+
+    public void setVertexStringAttributeFilter(int archetypeIndex, int attributeTypeIndex, String filterValue, StringMatchType matchType) {
+        AttributeFilter filter;
+        if (vertexAttributeFilters.containsKey(archetypeIndex)) {
+            filter = vertexAttributeFilters.get(archetypeIndex);
+        } else {
+            filter = new AttributeFilter();
+            vertexAttributeFilters.put(archetypeIndex, filter);
+        }
+        filter.addStringFilter(attributeTypeIndex, new StringAttributeFilter(filterValue, matchType));
+    }
+
+    public void setEdgeStringAttributeFilter(int archetypeIndex, int attributeTypeIndex, String filterValue, StringMatchType matchType) {
+        AttributeFilter filter;
+        if (edgeAttributeFilters.containsKey(archetypeIndex)) {
+            filter = edgeAttributeFilters.get(archetypeIndex);
+        } else {
+            filter = new AttributeFilter();
+            edgeAttributeFilters.put(archetypeIndex, filter);
+        }
+        filter.addStringFilter(attributeTypeIndex, new StringAttributeFilter(filterValue, matchType));
+    }
+
+    /*
+    advised filtering process:
+    first filter the archetypes using queries in the hash maps in GraphManager
+    then iterate through all vertices/edges that are left after the first step and for each vertex/edge do the following:
+     - use getVertex/EdgeAttributeFilter in GraphFilter to get the filer setting for the given archetype, this returns AttributeFilter
+     - iterate through all attributes of the vertex/edge and do the following:
+        - get the attribute data type and index
+        - use getString/Number/Enum/DateFilter in AttributeFilter to get the filter for the given attribute
+        - decide whether the attribute's value passes the filter and whether to keep the give vertex/edge or not
+     */
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/ITypeAttributeFilter.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/ITypeAttributeFilter.java
new file mode 100644
index 0000000..e28194f
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/ITypeAttributeFilter.java
@@ -0,0 +1,5 @@
+package cz.zcu.kiv.offscreen.graph.filter;
+
+public interface ITypeAttributeFilter {
+    boolean filter(Object value);
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/NumberAttributeFilter.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/NumberAttributeFilter.java
new file mode 100644
index 0000000..3b67d2c
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/NumberAttributeFilter.java
@@ -0,0 +1,57 @@
+package cz.zcu.kiv.offscreen.graph.filter;
+
+import java.math.BigDecimal;
+
+public class NumberAttributeFilter implements ITypeAttributeFilter {
+    private BigDecimal min;
+    private BigDecimal max;
+    private boolean minInclusive;
+    private boolean maxInclusive;
+    private GraphFilter.NumberMatchType matchType;
+
+    public NumberAttributeFilter(BigDecimal min, BigDecimal max, boolean minInclusive, boolean maxInclusive, GraphFilter.NumberMatchType matchType) {
+        this.min = min;
+        this.max = max;
+        this.minInclusive = minInclusive;
+        this.maxInclusive = maxInclusive;
+        this.matchType = matchType;
+    }
+
+    @Override
+    public boolean filter(Object value) {
+        BigDecimal val = (BigDecimal) value;
+        boolean result = false;
+
+        int cmpMin = -1;
+        int cmpMax = 1;
+
+        if (minInclusive) cmpMin = 0;
+        if (maxInclusive) cmpMax = 0;
+
+        if (min.compareTo(val) <= cmpMin && max.compareTo(val) >= cmpMax) {
+            result = true;
+        }
+
+        return (matchType == GraphFilter.NumberMatchType.MATCHING) == result;
+    }
+
+    public BigDecimal getMin() {
+        return min;
+    }
+
+    public BigDecimal getMax() {
+        return max;
+    }
+
+    public boolean isMinInclusive() {
+        return minInclusive;
+    }
+
+    public boolean isMaxInclusive() {
+        return maxInclusive;
+    }
+
+    public GraphFilter.NumberMatchType getMatchType() {
+        return matchType;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/StringAttributeFilter.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/StringAttributeFilter.java
new file mode 100644
index 0000000..1280fd7
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/StringAttributeFilter.java
@@ -0,0 +1,50 @@
+package cz.zcu.kiv.offscreen.graph.filter;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class StringAttributeFilter implements ITypeAttributeFilter {
+    private String filterValue;
+    private GraphFilter.StringMatchType matchType;
+
+    public StringAttributeFilter(String filterValue, GraphFilter.StringMatchType matchType) {
+        this.filterValue = filterValue;
+        this.matchType = matchType;
+    }
+
+    @Override
+    public boolean filter(Object value) {
+        String val = (String) value;
+        boolean result = false;
+
+        switch (matchType) {
+            case EXACT_MATCH:
+                if (val.equals(filterValue)) result = true;
+                break;
+            case EXACT_MISMATCH:
+                if (!val.equals(filterValue)) result = true;
+                break;
+            case CONTAINING:
+                if (val.contains(filterValue)) result = true;
+                break;
+            case NON_CONTAINING:
+                if (!val.contains(filterValue)) result = true;
+                break;
+            case REGULAR_EXPRESSION:
+                Pattern pattern = Pattern.compile(filterValue);
+                Matcher matcher = pattern.matcher(val);
+                if (matcher.find()) result = true;
+                break;
+        }
+
+        return result;
+    }
+
+    public String getFilterValue() {
+        return filterValue;
+    }
+
+    public GraphFilter.StringMatchType getMatchType() {
+        return matchType;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/VertexArchetypeFilter.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/VertexArchetypeFilter.java
new file mode 100644
index 0000000..21f19ca
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/filter/VertexArchetypeFilter.java
@@ -0,0 +1,13 @@
+package cz.zcu.kiv.offscreen.graph.filter;
+
+import java.util.List;
+
+public class VertexArchetypeFilter {
+    public List<Integer> archetypeIndeces;
+    public GraphFilter.ArchetypeMatchType matchType;
+
+    public VertexArchetypeFilter(List<Integer> archetypeIndeces, GraphFilter.ArchetypeMatchType matchType) {
+        this.archetypeIndeces = archetypeIndeces;
+        this.matchType = matchType;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/DemoDiagramLoader.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/DemoDiagramLoader.java
new file mode 100644
index 0000000..654158e
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/DemoDiagramLoader.java
@@ -0,0 +1,62 @@
+package cz.zcu.kiv.offscreen.graph.loader;
+
+import java.io.BufferedReader;
+import java.io.Closeable;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.apache.log4j.Logger;
+
+import cz.zcu.kiv.offscreen.servlets.LoadGraphData;
+
+public class DemoDiagramLoader {
+
+	private Logger logger = Logger.getLogger(LoadGraphData.class);
+
+	/**
+	 * 
+	 * Reads an input file specified by request.
+	 * 
+	 * @param in
+	 *            Input stream with JSON data.
+	 * @return JSON string
+	 */
+	public String readDemoJSONFromFile(InputStream in) {
+
+		BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+
+		StringBuffer buffer = new StringBuffer();
+		String line = null;
+
+		try {
+			while ((line = reader.readLine()) != null) {
+				buffer.append(line);
+			}
+
+		} catch (Exception e) {
+			logger.error("ERROR at file reading");
+		} finally {
+			closeQuietly(in);
+			closeQuietly(reader);
+		}
+
+		return buffer.toString();
+	}
+
+	/**
+	 * 
+	 * Closes quietly a stream.
+	 * 
+	 * @param stream
+	 *            Input stream to close.
+	 */
+	private void closeQuietly(Closeable stream) {
+		if (stream != null)
+			try {
+				stream.close();
+			} catch (Exception e) {
+				// ignore
+			}
+	}
+
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/GenericComponentLoader.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/GenericComponentLoader.java
new file mode 100644
index 0000000..68434e6
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/GenericComponentLoader.java
@@ -0,0 +1,67 @@
+package cz.zcu.kiv.offscreen.graph.loader;
+
+import cz.zcu.kiv.comav.core.export.loaders.ComponentLoader;
+import cz.zcu.kiv.comav.core.export.utils.ComAVException;
+import cz.zcu.kiv.comav.loaders.ejb3.Ejb3ComponentLoader;
+import cz.zcu.kiv.comav.loaders.osgi.OSGiComponentLoader;
+import java.io.IOException;
+import java.net.URI;
+import org.apache.log4j.Logger;
+
+/**
+ *
+ * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+ */
+public class GenericComponentLoader extends ComponentLoader {
+    
+    public static final String OSGI = "osgi";
+    public static final String SOFA2 = "sofa2";
+    public static final String EJB3 = "ejb3";
+    
+    private ComponentLoader loader;
+    
+    private Logger logger = Logger.getLogger(GenericComponentLoader.class);
+    
+    public GenericComponentLoader(String framework) {
+        logger.trace("ENTRY");
+        setComponentLoader(framework);
+        logger.trace("EXIT");
+    }
+    
+    private void setComponentLoader(String framework){
+        logger.trace("ENTRY");
+        if(OSGI.equalsIgnoreCase(framework)){
+            this.loader = new OSGiComponentLoader();
+        } else if (EJB3.equalsIgnoreCase(framework)){
+            this.loader = new Ejb3ComponentLoader();
+        } else if(SOFA2.equalsIgnoreCase(framework)){
+           // this.loader = new Sofa2LocalComponentLoader();
+        } else {
+            logger.error("Unsupported framework " + framework);
+            throw new IllegalStateException("Unsupported framework " + framework);
+        }
+        
+        logger.trace("EXIT");
+    }
+    
+    @Override
+    public void load(URI[] uris) throws IOException {
+        logger.trace("ENTRY");
+        
+        try {
+            loader.load(uris);
+        } catch (IOException e) {
+            try {
+                throw new ComAVException("Could not load data.", e);
+            } catch (ComAVException ex) {
+                System.out.println("ComAVException");
+                //Logger.getLogger(MyLoader.class.getName()).log(Level.SEVERE, null, ex);
+            }
+        }
+
+        model = loader.getModel();
+        componentList = loader.getComponents();
+        logger.trace("EXIT");
+    }
+    
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/GraphJSONDataLoader.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/GraphJSONDataLoader.java
new file mode 100644
index 0000000..ae7b5d9
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/GraphJSONDataLoader.java
@@ -0,0 +1,223 @@
+package cz.zcu.kiv.offscreen.graph.loader;
+
+import cz.zcu.kiv.offscreen.graph.Attribute;
+import cz.zcu.kiv.offscreen.graph.EdgeArchetypeInfo;
+import cz.zcu.kiv.offscreen.graph.GraphManager;
+import net.sf.json.JSONArray;
+import net.sf.json.JSONObject;
+import org.apache.commons.io.FileUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.text.ParsePosition;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Class loads json file with graph data.
+ * @author Stepan Baratta
+ */
+public class GraphJSONDataLoader {
+
+    private File file;
+    private String loadedJSON;
+
+    private GraphManager graphManager;
+
+    /**
+     * stores archetypes of vertices, key is the vertex id, value is the index of its archetype
+     */
+    private HashMap<Integer, Integer> vertexArchetypes = new HashMap<Integer, Integer>();
+
+    static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
+
+    public GraphJSONDataLoader(File file) {
+        this.file = file;
+    }
+
+    private void loadJSON() throws IOException {
+        loadedJSON = FileUtils.readFileToString(file, "UTF-8");
+    }
+
+    public GraphManager LoadData() throws IOException {
+        this.graphManager = new GraphManager();
+
+        loadJSON();
+        JSONObject json = JSONObject.fromObject(loadedJSON);
+
+        JSONArray attributeTypes = getLoadedAttributeTypes(json);
+
+        loadVertexArchetypes(json);
+
+        loadEdgeArchetypes(json);
+
+        loadVertices(attributeTypes, json);
+
+        loadEdges(attributeTypes, json);
+
+        return graphManager;
+    }
+
+    /**
+     * Returns the json array with the loaded attribute types.
+     * Adds the attributes to the list of all attribute types.
+     * @param json
+     * @return - Json array with the attribute types.
+     */
+    private JSONArray getLoadedAttributeTypes(JSONObject json) {
+        JSONArray attributeTypes = json.getJSONArray("attributeTypes");
+        for (int i = 0; i < attributeTypes.size(); i++) {
+            JSONObject attributeType = attributeTypes.getJSONObject(i);
+            String dataTypeString = attributeType.getString("dataType");
+            GraphManager.AttributeDataType dataType;
+            switch (dataTypeString) {
+                case "number": dataType = GraphManager.AttributeDataType.NUMBER; break;
+                case "date": dataType = GraphManager.AttributeDataType.DATE; break;
+                case "enum": dataType = GraphManager.AttributeDataType.ENUM; break;
+                default: dataType = GraphManager.AttributeDataType.STRING; break;
+            }
+            graphManager.addAttributeType(attributeType.getString("name"), dataType, attributeType.getString("text"));
+        }
+
+        return attributeTypes;
+    }
+
+    /**
+     * Loads the vertex archetypes from the json and adds them to all vertex archetypes.
+     * @param json
+     */
+    private void loadVertexArchetypes(JSONObject json) {
+        JSONArray vertexArchetypes = json.getJSONArray("vertexArchetypes");
+        for (int i = 0; i < vertexArchetypes.size(); i++) {
+            JSONObject vertexArchetype = vertexArchetypes.getJSONObject(i);
+
+            graphManager.addVertexArchetype(vertexArchetype.getString("name"), vertexArchetype.getString("text"));
+        }
+    }
+
+    /**
+     * Loads the edge archetypes from the json and adds them to all edge archetypes.
+     * @param json
+     */
+    private void loadEdgeArchetypes(JSONObject json) {
+        JSONArray edgeArchetypes = json.getJSONArray("edgeArchetypes");
+        for (int i = 0; i < edgeArchetypes.size(); i++) {
+            JSONObject edgeArchetype = edgeArchetypes.getJSONObject(i);
+
+            graphManager.addEdgeArchetype(edgeArchetype.getString("name"), edgeArchetype.getString("text"));
+        }
+    }
+
+    /**
+     * Loads the vertices from the json and adds them to the list of all vertices.
+     * @param attributeTypes - json array with the attribute types
+     * @param json
+     */
+    private void loadVertices(JSONArray attributeTypes, JSONObject json) {
+        JSONArray verticesObject = json.getJSONArray("vertices");
+        for (int i = 0; i < verticesObject.size(); i++) {
+            JSONObject vertexObject = verticesObject.getJSONObject(i);
+            String name = vertexObject.getString("title");
+            String text = vertexObject.getString("text");
+            int archetypeIndex = vertexObject.getInt("archetype");
+            int vertexId = vertexObject.getInt("id");
+            vertexArchetypes.put(vertexId, archetypeIndex);
+
+            JSONObject attributesObject = vertexObject.getJSONObject("attributes");
+            Map<Integer, Attribute> attributes = loadObjectAttributes(attributesObject, attributeTypes);
+
+            graphManager.addVertex(vertexId, name, text, archetypeIndex, attributes);
+        }
+    }
+
+    /**
+     * Loads the edges from the json and adds them to the list of all edges.
+     * @param attributeTypes - List of attributes
+     * @param json
+     */
+    private void loadEdges(JSONArray attributeTypes, JSONObject json) {
+        JSONArray edgesObject = json.getJSONArray("edges");
+        for (int i = 0; i < edgesObject.size(); i++) {
+            JSONObject edgeObject = edgesObject.getJSONObject(i);
+            int edgeId = edgeObject.getInt("id");
+            int from = edgeObject.getInt("from");
+            int to = edgeObject.getInt("to");
+            String text = edgeObject.getString("text");
+            int archetypeIndex = edgeObject.getInt("archetype");
+            int fromArchetypeIndex = vertexArchetypes.get(from);
+            int toArchetypeIndex = vertexArchetypes.get(to);
+
+            JSONObject attributesObject = edgeObject.getJSONObject("attributes");
+            Map<Integer, Attribute> attributes = loadObjectAttributes(attributesObject, attributeTypes);
+
+            EdgeArchetypeInfo archetypeInfo = new EdgeArchetypeInfo(fromArchetypeIndex, archetypeIndex, toArchetypeIndex);
+            graphManager.addEdge(edgeId, from, to, text, archetypeInfo, attributes);
+        }
+    }
+
+    /**
+     * Loads all the attributes for the json object.
+     * @param attributesObject - json object for which to get the attributes
+     * @param attributeTypes - All types of attributes
+     * @return Map of attributes for the json object
+     */
+    private Map<Integer, Attribute> loadObjectAttributes(JSONObject attributesObject, JSONArray attributeTypes) {
+        Map<Integer, Attribute> attributes = new HashMap<>();
+        for (Object attributeKey : attributesObject.keySet()) {
+            Object attrValue = loadAttributeFromObject((String)attributeKey, attributeTypes, attributesObject);
+
+            int attributeTypeIndex = Integer.parseInt((String)attributeKey);
+            attributes.put(attributeTypeIndex, new Attribute(attributeTypeIndex, attrValue));
+        }
+
+        return attributes;
+    }
+
+    /**
+     * Loads single attribute from the json object
+     * @param attributeIdString - Attribute id as key
+     * @param attributeTypes - All the attributes types
+     * @param attributesObject - Object containing all the attributes for the current object
+     * @return Value of the attribute
+     */
+    private Object loadAttributeFromObject(String attributeIdString, JSONArray attributeTypes, JSONObject attributesObject) {
+        int attributeId = Integer.parseInt(attributeIdString);
+        String attrType = attributeTypes.getJSONObject(attributeId).getString("dataType");
+        Object attrValue;
+        switch (attrType) {
+            case "number":
+                String val = attributesObject.getString(attributeIdString);
+                attrValue = new BigDecimal(val);
+                break;
+            case "date":
+                String dateStr = attributesObject.getString(attributeIdString);
+                SimpleDateFormat format = new SimpleDateFormat(GraphJSONDataLoader.DATETIME_FORMAT);
+                attrValue = format.parse(dateStr, new ParsePosition(0));
+                break;
+            case "enum":
+                List<String> enumValues = new ArrayList<>();
+                JSONArray enumValuesArray = attributesObject.optJSONArray(attributeIdString);
+                if (enumValuesArray == null) {
+                    enumValues.add(attributesObject.getString(attributeIdString)); // Only one value present
+                } else {
+                    for (int j = 0; j < enumValuesArray.size(); j++) {
+                        enumValues.add(enumValuesArray.getString(j));
+                    }
+                }
+
+                graphManager.addUniquePossibleAttributeValues(attributeId, enumValues);
+                attrValue = graphManager.getEnumPositionsForAttrIndex(attributeId, enumValues);
+
+                break;
+            default:
+                attrValue = attributesObject.getString(attributeIdString);
+                break;
+        }
+
+        return attrValue;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/JSONConfigLoader.java b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/JSONConfigLoader.java
new file mode 100644
index 0000000..cfb0e28
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/graph/loader/JSONConfigLoader.java
@@ -0,0 +1,393 @@
+package cz.zcu.kiv.offscreen.graph.loader;
+
+import cz.zcu.kiv.offscreen.graph.AttributeType;
+import cz.zcu.kiv.offscreen.graph.EdgeArchetypeInfo;
+import cz.zcu.kiv.offscreen.graph.GraphManager;
+import cz.zcu.kiv.offscreen.graph.filter.*;
+import net.sf.json.JSONArray;
+import net.sf.json.JSONObject;
+import org.apache.commons.io.FileUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.text.ParsePosition;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * Class is used to load the configuration file from disk.
+ * The configuration file contains default filters, svgs for archetype icons
+ * and other configurable application properties.
+ *
+ * @author Stepan Baratta
+ */
+public class JSONConfigLoader {
+
+    private GraphManager graphManager;
+    private JSONObject json;
+
+    /**
+     * Path to the directory with configuration file.
+     */
+    private String pathToConfig;
+
+    public static String configFilename = "config.json";
+
+    public JSONConfigLoader(GraphManager graphManager, String pathToConfig) {
+        this.graphManager = graphManager;
+        this.pathToConfig = pathToConfig;
+    }
+
+    /**
+     * Loads the default filter into the {@code GraphFilter} object.
+     * @return {@code GraphFilter} with set values of the default filter.
+     */
+    public GraphFilter loadDefaultFilter() {
+        GraphFilter filter = new GraphFilter();
+
+        try {
+            //String filterJson = FileUtils.readFileToString(new File("D:\\aswi-git\\aswi\\config\\empty_filter.json"), "UTF-8");
+            String filterJson = FileUtils.readFileToString(new File(pathToConfig + "\\" + configFilename), "UTF-8");
+
+            json = JSONObject.fromObject(filterJson);
+
+            JSONObject defaultFilter = json.getJSONObject("defaultFilter");
+            JSONObject vertexArchetypeFilter = defaultFilter.getJSONObject("vertexArchetypeFilter");
+
+            processVertexArchetypeFilters(filter, vertexArchetypeFilter);
+
+            JSONObject edgeArchetypeFilter = defaultFilter.getJSONObject("edgeArchetypeFilter");
+
+            processEdgeArchetypeFilters(filter, edgeArchetypeFilter);
+
+            Object[][] vertexAttributeFilterStrings = loadAttributeFilters(defaultFilter.getJSONArray("vertexAttributeFilters"));
+
+            createVertexAttributeFilters(filter, vertexAttributeFilterStrings);
+
+            Object[][] edgeAttributeFilterStrings = loadAttributeFilters(defaultFilter.getJSONArray("edgeAttributeFilters"));
+
+            createEdgeAttributeFilters(filter, edgeAttributeFilterStrings);
+
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        return filter;
+    }
+
+    /**
+     * Loads the edge archetypes from the json object.
+     * @param filter - Filter to be used.
+     * @param edgeArchetypeFilter - Json object containing the edge archetype filters.
+     */
+    private void processEdgeArchetypeFilters(GraphFilter filter, JSONObject edgeArchetypeFilter) {
+        JSONArray edgeFilterArchetypes = edgeArchetypeFilter.getJSONArray("archetypes");
+        String[][][] edgeArchetypeStrings = new String[edgeFilterArchetypes.size()][][];
+
+        for (int i = 0; i < edgeFilterArchetypes.size(); i++) {
+            edgeArchetypeStrings[i] = new String[3][];
+
+            JSONObject edgeFilterArchetype = edgeFilterArchetypes.getJSONObject(i);
+            JSONArray fromArchetypes = edgeFilterArchetype.getJSONArray("fromArchetypes");
+
+            edgeArchetypeStrings[i][0] = new String[fromArchetypes.size()];
+            for (int j = 0; j < fromArchetypes.size(); j++) {
+                edgeArchetypeStrings[i][0][j] = fromArchetypes.getString(j);
+            }
+
+            JSONArray edgeArchetypes = edgeFilterArchetype.getJSONArray("edgeArchetypes");
+            edgeArchetypeStrings[i][1] = new String[edgeArchetypes.size()];
+            for (int j = 0; j < edgeArchetypes.size(); j++) {
+                edgeArchetypeStrings[i][1][j] = edgeArchetypes.getString(j);
+            }
+
+            JSONArray toArchetypes = edgeFilterArchetype.getJSONArray("toArchetypes");
+            edgeArchetypeStrings[i][2] = new String[toArchetypes.size()];
+            for (int j = 0; j < toArchetypes.size(); j++) {
+                edgeArchetypeStrings[i][2][j] = toArchetypes.getString(j);
+            }
+        }
+
+        String edgeArchetypeMatchType = edgeArchetypeFilter.getString("matchType");
+
+        List<EdgeArchetypeInfo> edgeArchetypeFilterList = createEdgeArchetypeFilterList(edgeArchetypeStrings);
+
+        filter.setEdgeArchetypeFilter(edgeArchetypeFilterList, GraphFilter.ArchetypeMatchType.valueOf(edgeArchetypeMatchType.toUpperCase()));
+    }
+
+    /**
+     * Creates edge archetype filter list.
+     * @param edgeArchetypeStrings -
+     * @return
+     */
+    private List<EdgeArchetypeInfo> createEdgeArchetypeFilterList(String[][][] edgeArchetypeStrings) {
+        List<EdgeArchetypeInfo> edgeArchetypeFilterList = new ArrayList<>();
+        for (EdgeArchetypeInfo info : graphManager.edges.keySet()) {
+            for (String[][] edgeArchetypeString : edgeArchetypeStrings) {
+                boolean fromMatch = false;
+                boolean edgeMatch = false;
+                boolean toMatch = false;
+                String fromArchetype = graphManager.vertexArchetypes.get(info.fromArchetypeIndex).name;
+                String edgeArchetype = graphManager.edgeArchetypes.get(info.edgeArchetypeIndex).name;
+                String toArchetype = graphManager.vertexArchetypes.get(info.toArchetypeIndex).name;
+                for (int j = 0; j < edgeArchetypeString[0].length; j++) {
+                    fromMatch = (fromMatch || fromArchetype.equals(edgeArchetypeString[0][j]));
+                }
+                for (int j = 0; j < edgeArchetypeString[1].length; j++) {
+                    edgeMatch = (edgeMatch || edgeArchetype.equals(edgeArchetypeString[1][j]));
+                }
+                for (int j = 0; j < edgeArchetypeString[2].length; j++) {
+                    toMatch = (toMatch || toArchetype.equals(edgeArchetypeString[2][j]));
+                }
+                if (fromMatch && edgeMatch && toMatch) {
+                    edgeArchetypeFilterList.add(new EdgeArchetypeInfo(info.fromArchetypeIndex, info.edgeArchetypeIndex, info.toArchetypeIndex));
+                }
+            }
+        }
+        return edgeArchetypeFilterList;
+    }
+
+    /**
+     * Loads the vertex archetypes from the json object.
+     * @param filter - Filter to be used.
+     * @param vertexArchetypeFilter - Json object with the vertex archetype filters.
+     */
+    private void processVertexArchetypeFilters(GraphFilter filter, JSONObject vertexArchetypeFilter) {
+        JSONArray archetypes = vertexArchetypeFilter.getJSONArray("archetypes");
+
+        String[] vertexArchetypeStrings = new String[archetypes.size()];
+        for (int i = 0; i < archetypes.size(); i++) {
+            vertexArchetypeStrings[i] = archetypes.get(i).toString();
+        }
+
+        List<Integer> vertexArchetypeFilterList = new ArrayList<>();
+        for (int i = 0; i < graphManager.vertexArchetypes.size(); i++) {
+            for (String vertexArchetypeString : vertexArchetypeStrings) {
+                if (graphManager.vertexArchetypes.get(i).name.equals(vertexArchetypeString)) {
+                    vertexArchetypeFilterList.add(i);
+                }
+            }
+        }
+
+        String vertexArchetypeMatchType = vertexArchetypeFilter.getString("matchType");
+
+        filter.setVertexArchetypeFilter(vertexArchetypeFilterList, GraphFilter.ArchetypeMatchType.valueOf(vertexArchetypeMatchType.toUpperCase()));
+    }
+
+    /**
+     * Loads attribute filters from json array.
+     * @param attributeFilters - Json array with the attribute filters.
+     */
+    private Object[][] loadAttributeFilters(JSONArray attributeFilters) {
+        Object[][] attributeFilterStrings = new Object[attributeFilters.size()][3];
+
+        for (int i = 0; i < attributeFilters.size(); i++) {
+            JSONObject attributeFilter = attributeFilters.getJSONObject(i);
+            String archetypeName = attributeFilter.getString("archetype");
+            String attributeName = attributeFilter.getString("attributeName");
+
+            attributeFilterStrings[i][0] = archetypeName;
+            attributeFilterStrings[i][1] = attributeName;
+
+            JSONObject attributeFilterInfo = attributeFilter.getJSONObject("filter");
+            String filterMatchType = attributeFilterInfo.getString("matchType");
+
+            AttributeType attrType = graphManager.getAttributeDataTypeByName(attributeName);
+            switch (attrType.dataType) {
+                case ENUM:
+                    attributeFilterStrings[i][2] = getEnumAttributeFilter(attributeName, attributeFilterInfo, GraphFilter.EnumMatchType.valueOf(filterMatchType.toUpperCase()));
+                    break;
+                case NUMBER:
+                    attributeFilterStrings[i][2] = getNumberAttributeFilter(attributeFilterInfo, GraphFilter.NumberMatchType.valueOf(filterMatchType.toUpperCase()));
+                    break;
+                case DATE:
+                    attributeFilterStrings[i][2] = getDateAttributeFilter(attributeFilterInfo, GraphFilter.DateMatchType.valueOf(filterMatchType.toUpperCase()));
+                    break;
+                case STRING:
+                    attributeFilterStrings[i][2] = getStringAttributeFilter(attributeFilterInfo, GraphFilter.StringMatchType.valueOf(filterMatchType.toUpperCase()));
+                    break;
+            }
+        }
+
+        return attributeFilterStrings;
+    }
+
+    /**
+     * Sets the filtering objects from vertexAttributeFilterStrings to the graph filter object.
+     * @param filter - Graph filter object
+     * @param vertexAttributeFilterStrings - Array with attribute filter parameters (Archetype name, attribute name, filter object)
+     */
+    private void createVertexAttributeFilters(GraphFilter filter, Object[][] vertexAttributeFilterStrings) {
+        for (Object[] vertexAttributeFilterString : vertexAttributeFilterStrings) {
+            int archetypeIndex = graphManager.getVertexArchetypeIndex(vertexAttributeFilterString[0].toString());
+            int attributeIndex = graphManager.getAttributeIndex(vertexAttributeFilterString[1].toString());
+            GraphManager.AttributeDataType type = graphManager.attributeTypes.get(attributeIndex).dataType;
+            switch (type) {
+                case NUMBER:
+                    NumberAttributeFilter nf = (NumberAttributeFilter) vertexAttributeFilterString[2];
+                    filter.setVertexNumberAttributeFilter(archetypeIndex, attributeIndex, nf.getMin(), nf.getMax(), nf.isMinInclusive(), nf.isMaxInclusive(), nf.getMatchType());
+                    break;
+                case DATE:
+                    DateAttributeFilter df = (DateAttributeFilter) vertexAttributeFilterString[2];
+                    filter.setVertexDateAttributeFilter(archetypeIndex, attributeIndex, df.getMin(), df.getMax(), df.isMinInclusive(), df.isMaxInclusive(), df.getMatchType());
+                    break;
+                case STRING:
+                    StringAttributeFilter sf = (StringAttributeFilter) vertexAttributeFilterString[2];
+                    filter.setVertexStringAttributeFilter(archetypeIndex, attributeIndex, sf.getFilterValue(), sf.getMatchType());
+                    break;
+                case ENUM:
+                    EnumAttributeFilter ef = (EnumAttributeFilter) vertexAttributeFilterString[2];
+                    filter.setVertexEnumAttributeFilter(archetypeIndex, attributeIndex, ef.getValueIndices(), ef.getMatchType());
+                    break;
+            }
+        }
+    }
+
+    /**
+     * Sets the filtering objects from edgeAttributeFilterStrings to the graph filter object
+     * @param filter - Graph filter object
+     * @param edgeAttributeFilterStrings - Array with attribute filter parameters (Archetype name, attribute name, filter object)
+     */
+    private void createEdgeAttributeFilters(GraphFilter filter, Object[][] edgeAttributeFilterStrings) {
+        for (Object[] edgeAttributeFilterString : edgeAttributeFilterStrings) {
+            int archetypeIndex = graphManager.getEdgeArchetypeIndex(edgeAttributeFilterString[0].toString());
+            int attributeIndex = graphManager.getAttributeIndex(edgeAttributeFilterString[1].toString());
+            GraphManager.AttributeDataType type = graphManager.attributeTypes.get(attributeIndex).dataType;
+            switch (type) {
+                case NUMBER:
+                    NumberAttributeFilter nf = (NumberAttributeFilter) edgeAttributeFilterString[2];
+                    filter.setEdgeNumberAttributeFilter(archetypeIndex, attributeIndex, nf.getMin(), nf.getMax(), nf.isMinInclusive(), nf.isMaxInclusive(), nf.getMatchType());
+                    break;
+                case DATE:
+                    DateAttributeFilter df = (DateAttributeFilter) edgeAttributeFilterString[2];
+                    filter.setEdgeDateAttributeFilter(archetypeIndex, attributeIndex, df.getMin(), df.getMax(), df.isMinInclusive(), df.isMaxInclusive(), df.getMatchType());
+                    break;
+                case STRING:
+                    StringAttributeFilter sf = (StringAttributeFilter) edgeAttributeFilterString[2];
+                    filter.setEdgeStringAttributeFilter(archetypeIndex, attributeIndex, sf.getFilterValue(), sf.getMatchType());
+                    break;
+                case ENUM:
+                    EnumAttributeFilter ef = (EnumAttributeFilter) edgeAttributeFilterString[2];
+                    filter.setEdgeEnumAttributeFilter(archetypeIndex, attributeIndex, ef.getValueIndices(), ef.getMatchType());
+                    break;
+            }
+        }
+    }
+
+    /**
+     * Creates new string attribute filter with filter value from the json object. and returns it.
+     * @param vertexAttributeFilterInfo - Json object from which to extract the filter value.
+     * @param matchType - Type of matching in the filter.
+     * @return - new String attribute filter object.
+     */
+    private StringAttributeFilter getStringAttributeFilter(JSONObject vertexAttributeFilterInfo, GraphFilter.StringMatchType matchType) {
+        String filterValue = vertexAttributeFilterInfo.getString("value");
+
+        return new StringAttributeFilter(filterValue, matchType);
+    }
+
+    /**
+     * Creates new date attribute filter with filter value from the json object. and returns it.
+     * @param vertexAttributeFilterInfo - Json object from which to extract the filter value.
+     * @param matchType- Type of matching in the filter.
+     * @return - new Date attribute filter object.
+     */
+    private DateAttributeFilter getDateAttributeFilter(JSONObject vertexAttributeFilterInfo, GraphFilter.DateMatchType matchType) {
+        String min = vertexAttributeFilterInfo.getString("min");
+        String max = vertexAttributeFilterInfo.getString("max");
+        boolean minInclusive = vertexAttributeFilterInfo.getBoolean("minInclusive");
+        boolean maxInclusive = vertexAttributeFilterInfo.getBoolean("maxInclusive");
+
+        SimpleDateFormat format = new SimpleDateFormat(GraphJSONDataLoader.DATETIME_FORMAT);
+        Date minDate, maxDate;
+
+        minDate = format.parse(min, new ParsePosition(0));
+        maxDate = format.parse(max, new ParsePosition(0));
+
+        return new DateAttributeFilter(minDate, maxDate, minInclusive, maxInclusive, matchType);
+    }
+
+    /**
+     * Creates new number attribute filter with filter value from the json object. and returns it.
+     * @param vertexAttributeFilterInfo - Json object from which to extract the filter value.
+     * @param matchType - Type of matching in the filter.
+     * @return - new Number attribute filter object.
+     */
+    private NumberAttributeFilter getNumberAttributeFilter(JSONObject vertexAttributeFilterInfo, GraphFilter.NumberMatchType matchType) {
+        BigDecimal min = new BigDecimal(vertexAttributeFilterInfo.getInt("min"));
+        BigDecimal max = new BigDecimal(vertexAttributeFilterInfo.getInt("max"));
+        boolean minInclusive = vertexAttributeFilterInfo.getBoolean("minInclusive");
+        boolean maxInclusive = vertexAttributeFilterInfo.getBoolean("maxInclusive");
+
+        return new NumberAttributeFilter(min, max, minInclusive, maxInclusive, matchType);
+    }
+
+    /**
+     * Loads all the enum values for filtering and returns a list of indexes for those enum values.
+     * @param vertexAttributeName - Name of the vertex attribute for which to get the enum values.
+     * @param vertexAttributeFilterInfo - Json object containing the enum values.
+     * @return Enum attribute filter.
+     */
+    private EnumAttributeFilter getEnumAttributeFilter(String vertexAttributeName, JSONObject vertexAttributeFilterInfo, GraphFilter.EnumMatchType matchType) {
+        List<Integer> valueIndices = new ArrayList<>();
+
+        JSONArray values = vertexAttributeFilterInfo.getJSONArray("values");
+        for (int j = 0; j < values.size(); j++) {
+            String value = values.getString(j);
+            int index = graphManager.getEnumValueIndex(graphManager.getAttributeIndex(vertexAttributeName), value);
+            valueIndices.add(index);
+        }
+
+        return new EnumAttributeFilter(valueIndices, matchType);
+    }
+
+    /**
+     * Loads the archetype icons from the configuration file.
+     * @return -  Map where key is the name of archetype icon and the value is the svg description.
+     */
+    public Map<String, String> loadArchetypeIcons() {
+        Map<String, String> archetypeIcons = new HashMap<>();
+
+        JSONArray archetypeIconsJson = json.getJSONArray("archetypeIcons");
+        for (int i = 0; i < archetypeIconsJson.size(); i++) {
+            JSONObject icon = archetypeIconsJson.getJSONObject(i);
+            String archetypeName = icon.getString("name");
+            String iconSvg = icon.getString("value");
+
+            archetypeIcons.put(archetypeName, iconSvg);
+        }
+
+        return archetypeIcons;
+    }
+
+    /**
+     * Loads default group archetypes.
+     * @return list of indices of archetypes.
+     */
+    public List<Integer> loadGroupArchetypes() {
+        List<Integer> defaultGroupArchetypes = new ArrayList<>();
+
+        JSONArray defaultGroupArchetypesJson = json.getJSONArray("defaultGroupArchetypes");
+        for (int i = 0; i < defaultGroupArchetypesJson.size(); i++) {
+            String archetype = defaultGroupArchetypesJson.get(i).toString();
+            defaultGroupArchetypes.add(graphManager.getVertexArchetypeIndex(archetype));
+        }
+
+        return defaultGroupArchetypes;
+    }
+
+    /**
+     * Loads default group archetypes and return them in a list.
+     * @return list of archetypes.
+     */
+    public List<String> loadGroupArchetypesStrings(){
+        List<String> groupArchetypes = new ArrayList<>();
+
+        JSONArray defaultGroupArchetypesJson = json.getJSONArray("defaultGroupArchetypes");
+        for (Object jsonItem : defaultGroupArchetypesJson) {
+            groupArchetypes.add(jsonItem.toString());
+        }
+        return groupArchetypes;
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/loader/configuration/ConfigurationLoader.java b/sources/src/main/java/cz/zcu/kiv/offscreen/loader/configuration/ConfigurationLoader.java
new file mode 100644
index 0000000..3c1ff2d
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/loader/configuration/ConfigurationLoader.java
@@ -0,0 +1,36 @@
+package cz.zcu.kiv.offscreen.loader.configuration;
+
+import java.io.IOException;
+import javax.servlet.ServletContext;
+
+/**
+ * 
+ * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+ */
+public class ConfigurationLoader {
+
+	public static final String PROP_STORAGE_LOCATION = "storageLocation";
+	public static final String PROP_CONFIG_LOCATION = "configLocation";
+
+	/**
+	 * Get storage location property from web.xml.
+	 *
+	 * @param context App context.
+	 * @return Storage location path.
+	 * @throws IOException
+	 */
+	public static String getStorageLocation(ServletContext context) throws IOException {
+		return context.getInitParameter(PROP_STORAGE_LOCATION);
+	}
+
+	/**
+	 * Get configuration location property from web.xml.
+	 *
+	 * @param context App context.
+	 * @return Storage location path.
+	 * @throws IOException
+	 */
+	public static String getConfigLocation(ServletContext context) throws IOException {
+		return context.getInitParameter(PROP_CONFIG_LOCATION);
+	}
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/DefaultPage.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/DefaultPage.java
new file mode 100644
index 0000000..7813e35
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/DefaultPage.java
@@ -0,0 +1,59 @@
+package cz.zcu.kiv.offscreen.servlets;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
+import cz.zcu.kiv.offscreen.session.SessionManager;
+import cz.zcu.kiv.offscreen.storage.FileManager;
+import cz.zcu.kiv.offscreen.user.DB;
+import cz.zcu.kiv.offscreen.user.Diagram;
+
+/**
+ *
+ * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+ */
+public class DefaultPage extends HttpServlet {
+
+    /**
+     * Loads currently uploaded components and renders uploadFiles.jsp.
+     */
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        String sessionValue = SessionManager.getSessionValue(request, "JSESSIONID");
+        if (sessionValue != null && !"".equals(sessionValue)) {
+            String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
+
+            FileManager fileManager = new FileManager(sessionValue, storageLocation);
+            if (!fileManager.isExistStorage()) {
+                fileManager.createStorageDirectory();
+            }
+
+            request.setAttribute("componentNames", fileManager.getUploadedComponentsNames());
+        }
+        
+        DB db = new DB(getServletContext()); 
+        Diagram diagram_list = new Diagram(db);
+
+        List<Map<String, String>> list = new ArrayList<>();
+        if (request.getSession().getAttribute("logged_user") == "1") {
+			list = diagram_list.getDiagramListByUserId((int) request.getSession().getAttribute("logged_user_id"));
+        }
+
+        List<Map<String, String>> diagram_public_list = diagram_list.getDiagramPublicList();
+
+        request.setAttribute("diagramPublic", diagram_public_list);
+        request.setAttribute("diagramNames", list);
+
+        // render
+        RequestDispatcher rd = getServletContext().getRequestDispatcher("/uploadFiles.jsp");
+        rd.forward(request, response);
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/EfpImport.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/EfpImport.java
new file mode 100644
index 0000000..91f298f
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/EfpImport.java
@@ -0,0 +1,48 @@
+//package cz.zcu.kiv.offscreen.servlets;
+//
+//import java.io.IOException;
+//import javax.servlet.RequestDispatcher;
+//import javax.servlet.ServletException;
+//import javax.servlet.http.HttpServlet;
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//
+//import org.apache.log4j.Logger;
+//
+//import cz.zcu.kiv.offscreen.efp.utils.JsonTransformer;
+//
+///**
+// * Servlet used for serving JSON data incoming from efpPortal app.
+// *
+// * @author Jiri Loudil
+// */
+//public class EfpImport extends HttpServlet {
+//	private static final long serialVersionUID = 1L;
+//
+//	private Logger logger = Logger.getLogger(LoadGraphData.class);
+//
+//	@Override
+//	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+//		String data = request.getParameter("data");
+//
+//		// invalid data set
+//		if (data == null || data.isEmpty()) {
+//			logger.error("Data in message are null.");
+//			return;
+//		}
+//
+//		JsonTransformer transformer = new JsonTransformer();
+//
+//		request.setAttribute("graph_json",true);
+//
+//		// set the referrer for 'Back' graph button functionality
+//		request.setAttribute("efpPortalRefererUrl", request.getHeader("referer"));
+//
+//		request.getSession().setAttribute("graph_json_data", transformer.transformInputJSONToGraphJSON(data, request));
+//
+//		// render
+//		RequestDispatcher rd = getServletContext().getRequestDispatcher("/showGraph.jsp");
+//		rd.forward(request, response);
+//	}
+//
+//}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/LoadGraphData.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/LoadGraphData.java
new file mode 100644
index 0000000..17526b4
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/LoadGraphData.java
@@ -0,0 +1,87 @@
+package cz.zcu.kiv.offscreen.servlets;
+
+import cz.zcu.kiv.offscreen.graph.Graph;
+import cz.zcu.kiv.offscreen.api.GraphExport;
+import cz.zcu.kiv.offscreen.graph.GraphManager;
+import cz.zcu.kiv.offscreen.graph.loader.DemoDiagramLoader;
+import cz.zcu.kiv.offscreen.graph.loader.GraphJSONDataLoader;
+import cz.zcu.kiv.offscreen.graph.loader.JSONConfigLoader;
+import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
+import cz.zcu.kiv.offscreen.session.SessionManager;
+import cz.zcu.kiv.offscreen.storage.FileManager;
+import net.sf.json.JSONObject;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+ */
+public class LoadGraphData extends HttpServlet {
+
+    /**
+     * Constructs graph data using either the current graph version or the version set in query parameter. Resulting
+     * graph is returned as JSON in response body.
+     */
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        // initialize file manager
+        String workingDirectory;
+        if (request.getParameter("diagram_hash") == null) {
+            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
+        } else {
+            workingDirectory = request.getParameter("diagram_hash");
+        }
+
+        if (request.getParameter("graphVersion") != null) {
+            workingDirectory += File.separator + request.getParameter("graphVersion");
+        } else {
+            workingDirectory += File.separator + SessionManager.getSessionValue(request, "graphVersion");
+        }
+
+        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
+
+        FileManager fileManager = new FileManager(workingDirectory, storageLocation);
+        response.setContentType("application/json");
+
+        if (request.getSession().getAttribute("demo_id") == null) {
+            // it doesn't have EFPs -> read from ComAV
+            if (request.getSession().getAttribute("graph_json_data") == null) {
+                File[] uploadedFiles = fileManager.getUploadedComponents().toArray(new File[0]);
+                File fileToDisplay = uploadedFiles[0];
+
+                GraphManager graphManager = new GraphJSONDataLoader(fileToDisplay).LoadData();
+                String configLocation = ConfigurationLoader.getConfigLocation(request.getServletContext());
+                JSONConfigLoader configLoader = new JSONConfigLoader(graphManager, configLocation);
+                Graph graph = graphManager.createGraph(configLoader);
+                GraphExport export = new GraphExport(graph);
+                JSONObject json = JSONObject.fromObject(export);
+
+                String resultJsonString = json.toString();
+
+                response.getWriter().write(resultJsonString);
+
+            } else {
+                // it has EFPs -> read from the session
+                response.getWriter().write(request.getSession().getAttribute("graph_json_data").toString());
+
+                request.getSession().removeAttribute("graph_json_data");
+            }
+
+        } else {
+            String demoId = request.getSession().getAttribute("demo_id").toString();
+            String path = "/WEB-INF" + File.separator + "demoDiagram" + File.separator + demoId + ".json";
+
+            DemoDiagramLoader loader = new DemoDiagramLoader();
+            InputStream in = this.getServletContext().getResourceAsStream(path);
+
+            response.getWriter().write(loader.readDemoJSONFromFile(in));
+
+            request.getSession().setAttribute("demo_id", null);
+        }
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/Login.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/Login.java
new file mode 100644
index 0000000..02817f1
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/Login.java
@@ -0,0 +1,38 @@
+package cz.zcu.kiv.offscreen.servlets;
+
+import java.io.IOException;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import cz.zcu.kiv.offscreen.user.DB;
+import cz.zcu.kiv.offscreen.user.User;
+
+public class Login  extends HttpServlet {
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        Cookie cookie = new Cookie("framework", request.getParameter("framework"));
+        response.addCookie(cookie);
+        
+        DB db = new DB(getServletContext());
+        User logged_user_c = new User(db);
+
+        if (logged_user_c.login(request.getParameter("login_name"), request.getParameter("password"))) {
+            request.getSession().setAttribute("logged_user", "1");
+            request.getSession().setAttribute("logged_user_id", logged_user_c.getId() );
+            request.getSession().setAttribute("logged_user_nick", logged_user_c.getNick());
+        } else {
+            request.getSession().setAttribute("logged_user", "0");
+            request.getSession().setAttribute("logged_user_nick", "");
+            request.getSession().setAttribute("logged_user_err", "1");
+            request.getSession().setAttribute("logged_user_err_name", request.getParameter("login_name"));
+        }
+
+        // redirect
+        response.sendRedirect(getServletContext().getInitParameter("HOME_URL"));
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/Logout.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/Logout.java
new file mode 100644
index 0000000..01724e4
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/Logout.java
@@ -0,0 +1,20 @@
+package cz.zcu.kiv.offscreen.servlets;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class Logout extends HttpServlet {
+	
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        request.getSession().setAttribute("logged_user", null);
+        request.getSession().setAttribute("logged_user_id", null);
+        request.getSession().setAttribute("logged_user_nick", null);
+
+        // redirect
+        response.sendRedirect(getServletContext().getInitParameter("HOME_URL"));
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/Register.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/Register.java
new file mode 100644
index 0000000..55c2f0b
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/Register.java
@@ -0,0 +1,94 @@
+package cz.zcu.kiv.offscreen.servlets;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+
+import cz.zcu.kiv.offscreen.user.DB;
+import cz.zcu.kiv.offscreen.user.User;
+
+public class Register extends HttpServlet {
+    
+    private static final String EMAIL_ADDRESS_PATTERN = "^[A-Za-z0-9-\\+_]+(\\.[A-Za-z0-9-_]+)*@" +
+    											"[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*" +
+    											"(\\.[A-Za-z]{2,})$";
+    
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+    	DB db = new DB(getServletContext());
+    	User user = new User(db);
+    	
+    	String err = "";
+    	if (request.getParameter("user_name") == null || request.getParameter("user_name").length() == 0) {
+    		err += "Please fill name.";
+		}
+
+    	if (request.getParameter("user_email") == null || request.getParameter("user_email").length() == 0) {
+    		err += "Please fill e-mail address.";
+    	} else if (user.existsEmail(request.getParameter("user_email"))) {
+    		err += "E-mail already exists.";
+    	} else if (!isEmailAddressValid(request.getParameter("user_email"))) {
+    		err += "Please correct e-mail address.";
+    	}
+
+    	if (request.getParameter("user_nick") == null || request.getParameter("user_nick").length() == 0) {
+    		err += "Please fill nickname.";
+    	} else if (user.existsNick(request.getParameter("user_nick"))) {
+    		err += "Nickname already exists.";
+    	}
+    	
+    	if (request.getParameter("user_password") == null || request.getParameter("user_password").length() == 0 ||
+    	     request.getParameter("user_password_2") == null || request.getParameter("user_password_2").length() == 0) {
+    		err += "Please fill password.";
+    	} else if (request.getParameter("user_password").compareTo(request.getParameter("user_password_2")) != 0) {
+    		err += "Passwords must be same.";    		
+    	} else if (request.getParameter("user_password").length() <= 4) {
+    		err += "Passwords must be at least 5 characters long.";
+    	}
+
+		JSONObject jsonObject = new JSONObject();
+    	
+    	if (err.length() == 0) {
+    		Map<String, String> user_param = new HashMap<>();
+    		user_param.put("name", request.getParameter("user_name"));
+    		user_param.put("email", request.getParameter("user_email"));
+    		user_param.put("nick", request.getParameter("user_nick"));
+    		user_param.put("password", request.getParameter("user_password"));
+    		user_param.put("session", request.getSession().getId());
+
+    		user.register(user_param);
+    		
+    		jsonObject.put("ok", "ok");
+
+    	} else {
+    		jsonObject.put("err", err);
+    		response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
+    	}
+
+		response.setContentType("application/json");
+		response.getWriter().write(jsonObject.toString());
+		response.getWriter().flush();
+    }
+    
+    /**
+     * Method verify validity of email address
+     * 
+     * @param emailAddress - email address
+     * @return true - email address is ok
+     * 		   false - email address is not correct
+     */
+    private boolean isEmailAddressValid(String emailAddress) {
+    	Pattern pattern = Pattern.compile(EMAIL_ADDRESS_PATTERN);
+    	Matcher matcher = pattern.matcher(emailAddress);
+		return matcher.matches();
+    }
+	
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/ShowGraph.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/ShowGraph.java
new file mode 100644
index 0000000..103a444
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/ShowGraph.java
@@ -0,0 +1,153 @@
+package cz.zcu.kiv.offscreen.servlets;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
+import cz.zcu.kiv.offscreen.session.SessionManager;
+import cz.zcu.kiv.offscreen.storage.FileManager;
+import cz.zcu.kiv.offscreen.user.DB;
+import cz.zcu.kiv.offscreen.user.Diagram;
+
+/**
+ *
+ * @author Jindra PavlĂ­kovĂˇ <jindra.pav2@seznam.cz>
+ */
+public class ShowGraph extends HttpServlet {
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+    	// render
+        RequestDispatcher rd = getServletContext().getRequestDispatcher("/showGraph.jsp");
+        rd.forward(request, response);
+    }
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+		// framework
+        String framework = request.getParameter("framework") == null ? "osgi" : request.getParameter("framework");
+        response.addCookie(new Cookie("framework", framework));
+
+        // should save button be displayed?
+		boolean showSaveButton = request.getParameter("diagram_id") != null && request.getParameter("diagram_hash") != null;
+		request.setAttribute("show_icon_save", showSaveButton);
+
+		// is it only a demo diagram?
+		if (request.getParameter("demo_id") != null) {
+			request.getSession().setAttribute("demo_id", request.getParameter("demo_id"));
+		}
+
+		if (request.getParameter("diagram_name") != null && request.getParameter("diagram_id") == null) {
+			// save new diagram
+        	String sessionValue = SessionManager.getSessionValue(request, "JSESSIONID");
+        	String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
+			FileManager file_manage_without_id = new FileManager(sessionValue, storageLocation);
+
+        	String isPublic = "0";
+        	if (request.getParameter("public_diagram") != null && request.getParameter("public_diagram").compareTo("1") == 0) {
+        		isPublic = "1";
+        	}
+
+			Map<String, String> item_map = new HashMap<>();
+        	item_map.put("diagram_name", request.getParameter("diagram_name"));
+        	item_map.put("hash", sessionValue);
+        	item_map.put("user_id",  request.getSession().getAttribute("logged_user_id").toString());
+        	item_map.put("component_count", Integer.toString(file_manage_without_id.getUploadedComponentsNames().size()));
+        	item_map.put("public", isPublic);
+
+			DB db = new DB(getServletContext());
+			Diagram diagram = new Diagram(db);
+			diagram.update(item_map);
+
+            String file_directory = sessionValue + "_" + diagram.getIdStr();
+        	FileManager file_manage = new FileManager(file_directory, storageLocation);
+        	if (!file_manage.isExistStorage()) {
+        		file_manage.createStorageDirectory();
+        	}
+        	
+        	//copy directory to directory with postfix "_<id_diagram>"
+        	file_manage_without_id.copyUploadedComponents(storageLocation + File.separator + file_directory);
+
+        	response.sendRedirect( getServletContext().getInitParameter("HOME_URL") + "graph?diagram_id=" + diagram.getIdStr() + "&diagram_hash=" + sessionValue);
+        	return;
+        	
+        } else if (request.getParameter("diagram_name") != null && request.getParameter("diagram_id") != null) {
+        	// update existing diagram
+        	Integer diagramId = Integer.parseInt(request.getParameter("diagram_id"));
+
+        	String sessionValue = SessionManager.getSessionValue(request, "JSESSIONID");
+        	String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
+        	
+        	DB db = new DB(getServletContext());
+        	Diagram diagram = new Diagram(db, diagramId);
+            Map<String, String> diag_param = diagram.getDiagramParam(diagramId);
+
+			if (request.getSession().getAttribute("logged_user_id") != null) {
+				boolean doCopyDiagram = request.getParameter("copy_diag") != null && request.getParameter("copy_diag").compareTo("1") == 0;
+				if (doCopyDiagram) {
+					String diagramHash = diag_param.get("hash");
+					String vertices_position = diag_param.get("vertices_position");
+
+					FileManager copied_file_manage = new FileManager(diagramHash, storageLocation);
+					if (!copied_file_manage.isExistStorage()) {
+						copied_file_manage.createStorageDirectory();
+					}
+					copied_file_manage.copyUploadedComponents(storageLocation + File.separator + sessionValue);
+
+					Map<String, String> new_item_map = new HashMap<>();
+					new_item_map.put("diagram_name", request.getParameter("diagram_name"));
+					new_item_map.put("hash", sessionValue);
+					new_item_map.put("user_id", request.getSession().getAttribute("logged_user_id").toString());
+					new_item_map.put("component_count", Integer.toString(copied_file_manage.getUploadedComponentsNames().size()));
+					new_item_map.put("public", "0");
+					new_item_map.put("vertices_position", vertices_position);
+
+					Diagram newDiagram = new Diagram(db);
+					newDiagram.update(new_item_map);
+
+					FileManager file_manage = new FileManager(sessionValue, storageLocation);
+					if (!file_manage.isExistStorage()) {
+						file_manage.createStorageDirectory();
+					}
+
+					//copy directory to directory with postfix "_<id_diagram>"
+					copied_file_manage.copyUploadedComponents(storageLocation + File.separator + sessionValue);
+
+					response.sendRedirect(getServletContext().getInitParameter("HOME_URL") + "graph?diagram_id=" + newDiagram.getIdStr() + "&diagram_hash=" + sessionValue);
+					return;
+				}
+
+				if (request.getSession().getAttribute("logged_user_id").toString().equals(diag_param.get("user_id"))) {
+					String diagramHash = diag_param.get("hash");
+					FileManager file_manage = new FileManager(diagramHash, storageLocation);
+
+					String public_diag = "0";
+					if (request.getParameter("public_diagram") != null && request.getParameter("public_diagram").compareTo("1") == 0) {
+						public_diag = "1";
+					}
+
+					Map<String, String> item_map = new HashMap<>();
+					item_map.put("component_count", Integer.toString(file_manage.getUploadedComponentsNames().size()));
+					item_map.put("diagram_name", request.getParameter("diagram_name"));
+					item_map.put("public", public_diag);
+
+					diagram.update(item_map);
+				}
+			}
+
+			request.getSession().setAttribute("id_diagram", request.getParameter("id_diagram"));
+        }
+
+        // render
+		RequestDispatcher rd = getServletContext().getRequestDispatcher("/showGraph.jsp");
+		rd.forward(request, response);
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/CopyComponents.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/CopyComponents.java
new file mode 100644
index 0000000..03364fc
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/CopyComponents.java
@@ -0,0 +1,81 @@
+package cz.zcu.kiv.offscreen.servlets.actions;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.ParseException;
+import java.util.List;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
+import cz.zcu.kiv.offscreen.session.SessionManager;
+import cz.zcu.kiv.offscreen.storage.FileManager;
+
+/**
+ * @author Pavel Fidransky [jsem@pavelfidransky.cz]
+ */
+public class CopyComponents extends HttpServlet {
+
+    /**
+     * Makes a copy of components stored in the current graph version folder to the (current + 1) folder. Components to
+     * be copied are set by input JSON.
+     */
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        // read input data
+        StringBuilder sb = new StringBuilder();
+        try (BufferedReader reader = request.getReader()) {
+            String line;
+            while ((line = reader.readLine()) != null) {
+                sb.append(line);
+            }
+        }
+
+        // parse the data as JSON
+        JSONObject componentsJson;
+        try {
+            componentsJson = new JSONObject(sb.toString());
+        } catch (ParseException e) {
+            response.sendError(response.SC_BAD_REQUEST);
+            return;
+        }
+
+        // get current graph version from cookie
+        int version = Integer.parseInt(SessionManager.getSessionValue(request, "graphVersion"));
+
+        // initialize file manager
+        String workingDirectory;
+        if (request.getParameter("diagram_hash") == null) {
+            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
+        } else {
+            workingDirectory = request.getParameter("diagram_hash");
+        }
+
+        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
+
+        FileManager oldFileManager = new FileManager(workingDirectory + File.separator + String.valueOf(version), storageLocation);
+        FileManager newFileManager = new FileManager(workingDirectory + File.separator + String.valueOf(version + 1), storageLocation);
+
+        List<String> currentComponents = oldFileManager.getUploadedComponentsNames();
+
+        // copy components
+        JSONArray components = componentsJson.getJSONArray("components");
+        for (int i = 0; i < components.length(); i++) {
+            JSONObject component = components.getJSONObject(i);
+            String name = component.getString("name");
+
+            if (!currentComponents.contains(name)) continue;
+
+            String oldPath = storageLocation + File.separator + workingDirectory + File.separator + String.valueOf(version) + File.separator + name;
+            newFileManager.saveFile(new FileInputStream( oldPath), name);
+        }
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DeleteAllComponents.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DeleteAllComponents.java
new file mode 100644
index 0000000..1331a86
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DeleteAllComponents.java
@@ -0,0 +1,53 @@
+package cz.zcu.kiv.offscreen.servlets.actions;
+
+import java.io.File;
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
+import cz.zcu.kiv.offscreen.session.SessionManager;
+import cz.zcu.kiv.offscreen.storage.FileManager;
+
+/**
+ * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+ */
+public class DeleteAllComponents extends HttpServlet {
+
+    /**
+     * Delete all components from the graph. Optionally, only components of a particular graph version set in query
+     * parameter can be deleted. For AJAX requests, 204 NO_CONTENT status code is returned.
+     */
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        String workingDirectory;
+        if (request.getParameter("diagram_hash") == null) {
+            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
+        } else {
+            workingDirectory = request.getParameter("diagram_hash");
+        }
+
+        if (request.getParameter("graphVersion") != null) {
+            workingDirectory += File.separator + request.getParameter("graphVersion");
+        }
+
+        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
+        
+        FileManager fileManager = new FileManager(workingDirectory, storageLocation);
+        fileManager.deleteAllFiles();
+
+        String requestedWith = request.getHeader("X-Requested-With");
+        if (requestedWith != null && requestedWith.equals("XMLHttpRequest")) {
+            // AJAX request, send response
+            response.setStatus(response.SC_NO_CONTENT);
+
+        } else {
+            request.setAttribute("componentNames", fileManager.getUploadedComponentsNames());
+
+            // redirect
+            response.sendRedirect(getServletContext().getInitParameter("HOME_URL") + "upload-files");
+        }
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DeleteComponent.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DeleteComponent.java
new file mode 100644
index 0000000..a8058ef
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DeleteComponent.java
@@ -0,0 +1,81 @@
+package cz.zcu.kiv.offscreen.servlets.actions;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
+import cz.zcu.kiv.offscreen.session.SessionManager;
+import cz.zcu.kiv.offscreen.storage.FileManager;
+import cz.zcu.kiv.offscreen.user.DB;
+import cz.zcu.kiv.offscreen.user.Diagram;
+
+/**
+ * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+ */
+public class DeleteComponent extends HttpServlet {
+
+    /**
+     * Deleted a single component from either the current graph version or the version set in query parameter. For AJAX
+     * requests, 204 NO_CONTENT status code is returned.
+     */
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        String workingDirectory;
+        if (request.getParameter("diagram_hash") == null) {
+            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
+        } else {
+            workingDirectory = request.getParameter("diagram_hash");
+        }
+
+        if (request.getParameter("graphVersion") != null) {
+            workingDirectory += File.separator + request.getParameter("graphVersion");
+        } else {
+            workingDirectory += File.separator + SessionManager.getSessionValue(request, "graphVersion");
+        }
+
+        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
+
+        boolean doDeleteComponent = true;
+        String redirectUrlParams = "";
+
+        if (request.getParameter("diagram_id") != null && request.getParameter("diagram_hash") != null) {
+            Integer diagramId = Integer.parseInt(request.getParameter("id_diagram"));
+
+            DB db = new DB(getServletContext());
+            Diagram diagram = new Diagram(db, diagramId);
+            Map<String, String> diag_param = diagram.getDiagramParam(diagramId);
+
+            if (request.getSession().getAttribute("logged_user_id") == null) {
+        		doDeleteComponent = false;
+            } else if (request.getSession().getAttribute("logged_user_id").toString().equals(diag_param.get("user_id"))) {
+            	doDeleteComponent = true;
+        	} else {
+        		doDeleteComponent = false;
+        	}
+
+            redirectUrlParams = "?diagram_id=" + request.getParameter("diagram_id") + "&diagram_hash=" + request.getParameter("diagram_hash");
+        }
+        
+        if (doDeleteComponent) {
+	        FileManager fileManager = new FileManager(workingDirectory, storageLocation);
+	        fileManager.deleteFile(request.getParameter("name"));
+
+	        request.setAttribute("componentNames", fileManager.getUploadedComponentsNames());
+        }
+
+        String requestedWith = request.getHeader("X-Requested-With");
+        if (requestedWith != null && requestedWith.equals("XMLHttpRequest")) {
+            // AJAX request, send response
+            response.setStatus(response.SC_NO_CONTENT);
+
+        } else {
+            // redirect
+            response.sendRedirect(getServletContext().getInitParameter("HOME_URL") + "upload-files" + redirectUrlParams);
+        }
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DiagramEndpoint.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DiagramEndpoint.java
new file mode 100644
index 0000000..58a7ba5
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DiagramEndpoint.java
@@ -0,0 +1,133 @@
+package cz.zcu.kiv.offscreen.servlets.actions;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Map;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
+import cz.zcu.kiv.offscreen.storage.FileManager;
+import cz.zcu.kiv.offscreen.user.DB;
+import cz.zcu.kiv.offscreen.user.Diagram;
+
+public class DiagramEndpoint extends HttpServlet {
+
+    /**
+     * Returns position of components in diagram by id and hash code.
+     */
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        // diagram ID is not set
+        if (request.getParameter("id_diagram") == null) {
+            response.sendError(response.SC_BAD_REQUEST);
+            return;
+        }
+
+        Integer diagramId = Integer.parseInt(request.getParameter("diagram_id"));
+
+        DB db = new DB(getServletContext());
+        Diagram diagram = new Diagram(db);
+        Map<String, String> diag_param = diagram.getDiagramParam(diagramId);
+
+        // user is not owner of the diagram
+        if (!request.getSession().getAttribute("logged_user_id").toString().equals(diag_param.get("user_id"))) {
+            response.sendError(response.SC_UNAUTHORIZED);
+            return;
+        }
+
+        // send response
+        response.setContentType("application/json");
+
+        PrintWriter out = response.getWriter();
+        out.write(diag_param.get("vertices_position"));
+        out.flush();
+    }
+
+    /**
+     * Method saves position of component, which are send by parameter in post method.
+     */
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        // user is not logged in
+        if (request.getSession().getAttribute("logged_user_id") == null) {
+            response.sendError(response.SC_UNAUTHORIZED);
+            return;
+        }
+
+        // diagram ID is not set
+        if (request.getParameter("id_diagram") == null) {
+            response.sendError(response.SC_BAD_REQUEST);
+            return;
+        }
+
+        Integer diagramId = Integer.parseInt(request.getParameter("diagram_id"));
+
+        DB db = new DB(getServletContext());
+        Diagram diagram = new Diagram(db, diagramId);
+        Map<String, String> diag_param = diagram.getDiagramParam(diagramId);
+
+        // user is not owner of the diagram
+        if (!request.getSession().getAttribute("logged_user_id").toString().equals(diag_param.get("user_id"))) {
+            response.sendError(response.SC_UNAUTHORIZED);
+            return;
+        }
+
+        String verticesPosition = request.getParameter("vertices_position");
+        diagram.updateVerticesPosition(verticesPosition);
+
+        // send response
+        response.setContentType("application/json");
+
+        PrintWriter out = response.getWriter();
+        out.write(verticesPosition);
+        out.flush();
+    }
+
+    /**
+     * Deletes diagram from database and from file system.
+     * Id of diagrams is loaded from get parameter in url.
+     * In method is controlled logged user and user, who uploaded diagram.
+     */
+    @Override
+    protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        // user is not logged in
+        if (request.getSession().getAttribute("logged_user_id") == null) {
+            response.sendError(response.SC_UNAUTHORIZED);
+            return;
+        }
+
+        // diagram ID is not set
+        if (request.getParameter("id_diagram") == null) {
+            response.sendError(response.SC_BAD_REQUEST);
+            return;
+        }
+
+        Integer diagramId = Integer.parseInt(request.getParameter("id_diagram"));
+
+        DB db = new DB(getServletContext());
+        Diagram diagram = new Diagram(db, diagramId);
+        Map<String, String> diag_param = diagram.getDiagramParam(diagramId);
+
+        // user is not owner of the diagram
+        if (!request.getSession().getAttribute("logged_user_id").toString().equals(diag_param.get("user_id"))) {
+            response.sendError(response.SC_UNAUTHORIZED);
+            return;
+        }
+
+        String workingDirectory = diag_param.get("hash") + "_" + diag_param.get("id");
+        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
+
+        FileManager fileManager = new FileManager(workingDirectory, storageLocation);
+        fileManager.deleteAllFiles();
+        fileManager.deleteDirectory();
+
+        diagram.delete();
+
+        // send response
+        response.setStatus(response.SC_NO_CONTENT);
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DownloadComponent.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DownloadComponent.java
new file mode 100644
index 0000000..1be3897
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/DownloadComponent.java
@@ -0,0 +1,102 @@
+package cz.zcu.kiv.offscreen.servlets.actions;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.log4j.Logger;
+import org.json.JSONObject;
+
+import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
+import cz.zcu.kiv.offscreen.session.SessionManager;
+import cz.zcu.kiv.offscreen.storage.FileManager;
+
+/**
+ * @author Pavel Fidransky [jsem@pavelfidransky.cz]
+ */
+public class DownloadComponent extends HttpServlet {
+
+    private String crceApiBase;
+    private FileManager fileManager;
+
+    private Logger logger = Logger.getLogger(DownloadComponent.class);
+
+    /**
+     * Downloads component by its UUID set in query parameter. The component is then stored in the current graph version
+     * folder. As a response, JSON containing component's UUID and filename is returned.
+     */
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        logger.error("Method is no longer supported because CRCE is removed from project.");
+//        // there was no uuid passed in the request
+//        if (request.getParameter("uuid") == null) {
+//            response.sendError(response.SC_BAD_REQUEST);
+//            return;
+//        }
+//
+//        // initialize file manager
+//        String workingDirectory;
+//        if (request.getParameter("diagram_hash") == null) {
+//            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
+//        } else {
+//            workingDirectory = request.getParameter("diagram_hash");
+//        }
+//
+//        if (request.getParameter("graphVersion") != null) {
+//            workingDirectory += File.separator + request.getParameter("graphVersion");
+//        } else {
+//            workingDirectory += File.separator + SessionManager.getSessionValue(request, "graphVersion");
+//        }
+//
+//        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
+//
+//        fileManager = new FileManager(workingDirectory, storageLocation);
+//        if (!fileManager.isExistStorage()) {
+//            fileManager.createStorageDirectory();
+//        }
+//
+//        // download component
+//        crceApiBase = ConfigurationLoader.getCrceApiBase(request.getServletContext());
+//
+//        String uuid = request.getParameter("uuid");
+//        String name = downloadComponent(uuid);
+//
+//        JSONObject componentJson = new JSONObject();
+//        componentJson.put("uuid", uuid);
+//        componentJson.put("name", name);
+//
+//        // send response
+//        response.setContentType("application/json");
+//        response.getWriter().write(componentJson.toString());
+    }
+
+    /*
+    PRIVATE METHODS
+     */
+
+    private String downloadComponent(String uuid) throws IOException {
+        URL url = new URL(this.crceApiBase + "/resources/" + uuid);
+        HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+        connection.setConnectTimeout(60 * 1000);
+        connection.setReadTimeout(60 * 1000);
+
+        InputStream inputStream = connection.getInputStream();
+
+        String contentDisposition = connection.getHeaderField("Content-Disposition");
+        String fileName = contentDisposition.replaceFirst("(?i)^.*filename = ([^\"]+).*$", "$1");
+        File file = new File(fileName);
+
+        fileManager.saveFile(inputStream, file.getName());
+
+        inputStream.close();
+
+        return file.getName();
+    }
+
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/LoadLog.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/LoadLog.java
new file mode 100644
index 0000000..8d04ba4
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/LoadLog.java
@@ -0,0 +1,77 @@
+package cz.zcu.kiv.offscreen.servlets.actions;
+
+import cz.zcu.kiv.offscreen.user.DB;
+import cz.zcu.kiv.offscreen.user.Diagram;
+import cz.zcu.kiv.offscreen.user.Log;
+import cz.zcu.kiv.offscreen.user.User;
+import net.sf.json.JSONObject;
+import org.apache.log4j.Logger;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import net.sf.json.JSONArray;
+
+public class LoadLog extends HttpServlet {
+
+    private Logger logger = Logger.getLogger(LoadLog.class);
+    
+    /**
+     * Handles the HTTP
+     * <code>GET</code> method.
+     *
+     * @param request servlet request
+     * @param response servlet response
+     * @throws ServletException if a servlet-specific error occurs
+     * @throws IOException if an I/O error occurs
+     */
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        throw new UnsupportedOperationException();
+    }
+    
+    /**
+     * Handles the HTTP
+     * <code>POST</code> method.
+     *
+     * @param request servlet request
+     * @param response servlet response
+     * @throws ServletException if a servlet-specific error occurs
+     * @throws IOException if an I/O error occurs
+     */
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        logger.info("Servlet - LoadLog \t\t method - doGet \t\t Start");
+        Object userIdStr = request.getSession().getAttribute("logged_user_id");
+        String diagramIDStr = request.getParameter("id_diagram");
+
+        response.setContentType("application/json");
+        PrintWriter out = response.getWriter();
+        if(diagramIDStr != null && userIdStr!=null) {
+                int diagramID = Integer.parseInt(diagramIDStr);
+                int userId = Integer.parseInt(userIdStr.toString());
+                DB dbConn = new DB(getServletContext());
+                String output = "";
+                Log log= new Log(dbConn);
+                List<Map<String,String>> listLogs = log.readLogs(diagramID);
+                JSONArray o = JSONArray.fromObject(listLogs);
+                output += o;
+                out.write(output);
+                logger.info("Servlet - LoadLog \t\t method - doGet \t\t return: " +o.toString());
+            }else {
+                logger.info("Servlet - LoadLog \t\t method - doGet \t\t diagramId or userId is null");
+            }
+        out.close();
+        logger.info("Servlet - LoadLog \t\t method - doGet \t\t end");
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/SaveLog.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/SaveLog.java
new file mode 100644
index 0000000..69b1475
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/SaveLog.java
@@ -0,0 +1,146 @@
+package cz.zcu.kiv.offscreen.servlets.actions;
+
+import cz.zcu.kiv.offscreen.user.DB;
+import cz.zcu.kiv.offscreen.user.Diagram;
+import cz.zcu.kiv.offscreen.user.Log;
+import org.apache.log4j.Logger;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+
+/**
+ * Class for save log
+ * 
+ * @author Marek Rasocha
+ *
+ */
+public class SaveLog extends HttpServlet{
+    private Logger logger = Logger.getLogger(SaveLog.class);
+  
+    
+    /**
+     * Method saves position of component, which are send by parameter in post method.
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+ logger.info("Servlet - SaveLog \t\t method - doPost \t\t start");
+        //id of diagram, which will be updated
+        String diagramIdStr  = request.getParameter("id_diagram");
+        Object userIdStr = request.getSession().getAttribute("logged_user_id");
+        DB db = new DB(getServletContext());
+        PrintWriter out = response.getWriter();
+        try{
+            if(diagramIdStr != null && userIdStr!=null) {
+                if (checkUserId(Integer.parseInt(diagramIdStr),Integer.parseInt(userIdStr.toString()),db)){
+                    HashMap<String, String> log = new HashMap<String, String>();
+                    log.put("user_name", request.getSession().getAttribute("logged_user_nick").toString());
+                    log.put("user_id", userIdStr.toString());
+                    log.put("id_diagram", diagramIdStr);
+                    String event = request.getParameter("log_event");
+                    log.put("log_event", event );
+                    log.put("log_date_delay", request.getParameter("log_date_delay"));
+                    log.put("change_jar", request.getParameter("change_jar"));
+                    log.put("new_version", request.getParameter("new_version"));
+                    if(event==null){
+                        out.write("{\"err\":\""+ "event is null" +"\"}");
+                    }else{
+                        Log logDao = new Log(db);
+                        if(logDao.createLog(log)>0){
+                            out.write("{\"ok\":\"ok\"}");
+                            logger.info("Servlet - SaveLog \t\t method - doPost \t\t Log created");
+                        }else{
+                            out.write("{\"err\":\""+ "database error " +"\"}");
+                            logger.info("Servlet - SaveLog \t\t method - doPost \t\t error database");
+                        }
+                        
+                    }
+                    
+                }else{
+                    logger.info("Servlet - SaveLog \t\t method - doPost \t\t This user dont have a permisson");
+                    out.write("{\"err\":\""+ "This user has not permission for showing the log " +"\"}");
+                }
+            }else{
+                logger.info("Servlet - SaveLog \t\t method - doPost \t\t diagramId or userId is null");
+                out.write("{\"err\":\""+ "diagramId or userId is null" +"\"}");
+            }
+
+        	
+        }catch(NumberFormatException e){
+        	e.printStackTrace();
+        }catch(Exception e){
+        	e.printStackTrace();
+        }
+        out.close();
+        logger.info("Servlet - SaveLog \t\t method - doPost \t\t end");
+    }
+
+    private boolean checkUserId(int diagramID, int userId, DB db) {
+
+        Diagram diag = new Diagram(db);
+        HashMap<String,String> param = (HashMap<String, String>) diag.getDiagramParam(diagramID);
+        String idStr = param.get("user_id");
+        int id = Integer.parseInt(idStr);
+        if (userId==0){
+            return false;
+        }
+        return  id==userId ? true : false;
+    }
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+            throws ServletException, IOException {
+        logger.info("Servlet - SaveLog \t\t method - doPost \t\t start");
+        //id of diagram, which will be updated
+        String diagramIdStr  = request.getParameter("id_diagram");
+        Object userIdStr = request.getSession().getAttribute("logged_user_id");
+        DB db = new DB(getServletContext());
+        PrintWriter out = response.getWriter();
+        try{
+            if(diagramIdStr != null && userIdStr!=null) {
+                if (checkUserId(Integer.parseInt(diagramIdStr),Integer.parseInt(userIdStr.toString()),db)){
+                    HashMap<String, String> log = new HashMap<String, String>();
+                    log.put("user_name", request.getSession().getAttribute("logged_user_nick").toString());
+                    log.put("user_id", userIdStr.toString());
+                    log.put("id_diagram", diagramIdStr);
+                    String event = request.getParameter("log_event");
+                    log.put("log_event", event );
+                    log.put("log_date_delay", request.getParameter("log_date_delay"));
+                    log.put("change_jar", request.getParameter("change_jar"));
+                    log.put("new_version", request.getParameter("new_version"));
+                    if(event==null){
+                        out.write("{\"err\":\""+ "event is null" +"\"}");
+                    }else{
+                        Log logDao = new Log(db);
+                        if(logDao.createLog(log)>0){
+                            out.write("{\"ok\":\"ok\"}");
+                            logger.info("Servlet - SaveLog \t\t method - doPost \t\t Log created");
+                        }else{
+                            out.write("{\"err\":\""+ "database error " +"\"}");
+                            logger.info("Servlet - SaveLog \t\t method - doPost \t\t error database");
+                        }
+                        
+                    }
+                    
+                }else{
+                    logger.info("Servlet - SaveLog \t\t method - doPost \t\t This user dont have a permisson");
+                    out.write("{\"err\":\""+ "This user has not permission for showing the log " +"\"}");
+                }
+            }else{
+                logger.info("Servlet - SaveLog \t\t method - doPost \t\t diagramId or userId is null");
+                out.write("{\"err\":\""+ "diagramId or userId is null" +"\"}");
+            }
+
+        	
+        }catch(NumberFormatException e){
+        	e.printStackTrace();
+        }catch(Exception e){
+        	e.printStackTrace();
+        }
+        out.close();
+        logger.info("Servlet - SaveLog \t\t method - doPost \t\t end");
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/UploadFiles.java b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/UploadFiles.java
new file mode 100644
index 0000000..784afc2
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/servlets/actions/UploadFiles.java
@@ -0,0 +1,100 @@
+package cz.zcu.kiv.offscreen.servlets.actions;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+
+import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
+import cz.zcu.kiv.offscreen.session.SessionManager;
+import cz.zcu.kiv.offscreen.storage.FileManager;
+import cz.zcu.kiv.offscreen.user.DB;
+import cz.zcu.kiv.offscreen.user.Diagram;
+
+/**
+ *
+ * @author Jindra PavlĂ­kovĂˇ <jindra.pav2@seznam.cz>
+ */
+public class UploadFiles extends HttpServlet {
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        doPost(request, response);
+    }
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        DB db = new DB(getServletContext());
+
+        String diagram_id = request.getParameter("diagram_id");
+        if (diagram_id != null) {
+            Integer diagramId = Integer.parseInt(diagram_id);
+
+	        Diagram diagram_edit = new Diagram(db, diagramId);
+	        Map<String, String> diag_param = diagram_edit.getDiagramParam(diagramId);
+	        
+	        request.setAttribute("diagram_name", diag_param.get("name"));
+	        request.setAttribute("diagram_user_id", diag_param.get("user_id"));
+	        request.setAttribute("diagram_public_checked", (diag_param.get("public").compareTo("1") == 0 ? " checked=\"checked\" " : ""));
+        } else {
+        	request.setAttribute("diagram_name", "");
+        	request.setAttribute("diagram_public_checked", "");
+        	request.setAttribute("diagram_user_id", "-1");
+        }
+
+        // initialize file manager
+        String workingDirectory;
+        if (request.getParameter("diagram_hash") == null) {
+            workingDirectory = SessionManager.getSessionValue(request, "JSESSIONID");
+        } else {
+            workingDirectory = request.getParameter("diagram_hash");
+        }
+
+        int version = 1;
+        workingDirectory += File.separator + String.valueOf(version);
+
+        String storageLocation = ConfigurationLoader.getStorageLocation(request.getServletContext());
+
+        FileManager fileManager = new FileManager(workingDirectory, storageLocation);
+        if (!fileManager.isExistStorage()) {
+            fileManager.createStorageDirectory();
+        }
+
+        // save files from request
+        String result;
+        if (ServletFileUpload.isMultipartContent(request)) {
+            result = fileManager.saveFile(request);
+        } else {
+            result = "";
+        }
+
+        response.addCookie(new Cookie("graphVersion", String.valueOf(version)));
+
+        // response
+        ArrayList<Map<String, String>> list = new ArrayList<>();
+        if (request.getSession().getAttribute("logged_user") == "1") {
+            int loggedUserId = (int) request.getSession().getAttribute("logged_user_id");
+
+			list = new Diagram(db).getDiagramListByUserId(loggedUserId);
+        }
+        request.setAttribute("diagramNames", list);
+
+        request.setAttribute("diagramPublic", new Diagram(db).getDiagramPublicList());
+        
+        request.setAttribute("componentNames", fileManager.getUploadedComponentsNames());
+        request.setAttribute("errorMessage", result);
+
+        // render
+        RequestDispatcher rd = getServletContext().getRequestDispatcher("/uploadFiles.jsp");
+        rd.forward(request, response);
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/session/SessionManager.java b/sources/src/main/java/cz/zcu/kiv/offscreen/session/SessionManager.java
new file mode 100644
index 0000000..f6b963f
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/session/SessionManager.java
@@ -0,0 +1,73 @@
+package cz.zcu.kiv.offscreen.session;
+
+import cz.zcu.kiv.offscreen.loader.configuration.ConfigurationLoader;
+import cz.zcu.kiv.offscreen.storage.FileManager;
+import java.io.IOException;
+import java.util.logging.Level;
+import javax.servlet.http.*;
+import org.apache.log4j.Logger;
+
+/**
+ *
+ * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+ */
+public class SessionManager implements HttpSessionListener {
+
+    private static Logger logger = Logger.getLogger(SessionManager.class);
+
+    /**
+     * Get session value.
+     * @param request request
+     * @param sessionName session name
+     * @return Returns value which correspond sessionName
+     */
+    public static String getSessionValue(HttpServletRequest request, String sessionName) {
+        logger.trace("ENTRY");
+        logger.debug("*" + request.getCookies() + "*");
+        Cookie[] cookie = null;
+        String sessionValue = "";
+
+        if (request.getCookies() != null) {
+            cookie = request.getCookies();
+            logger.debug(cookie.length);
+            for (int i = 0; i < cookie.length; i++) {
+                logger.debug(cookie[i]);
+                if ((cookie[i].getName()).equals(sessionName)) {
+                    sessionValue = cookie[i].getValue();
+                }
+            }
+        }
+        logger.trace("EXIT");
+        return sessionValue;
+    }
+
+    @Override
+    public void sessionCreated(HttpSessionEvent se) {
+        logger.trace("ENTRY");
+        HttpSession session = se.getSession();
+        logger.info("Session " + session.getId()
+                + " was created with timeout " + session.getMaxInactiveInterval());
+        logger.trace("EXIT");
+    }
+
+    @Override
+    public void sessionDestroyed(HttpSessionEvent se) {
+        try {
+            logger.trace("ENTRY");
+            HttpSession session = se.getSession();
+            logger.info("Session " + session.getId() + " was invalidated.");
+
+            String storageLocation = ConfigurationLoader.getStorageLocation(session.getServletContext());
+            FileManager storage = new FileManager(session.getId(), storageLocation);
+            try {
+                storage.deleteDirectory();
+            } catch (IOException ex) {
+                logger.error("Directory " + session.getId() + " was not deleted. " + ex.getMessage());
+            }
+            logger.trace("EXIT");
+        } catch (IOException ex) {
+            java.util.logging.Logger.getLogger(SessionManager.class.getName()).log(Level.SEVERE, null, ex);
+        }
+
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/storage/FileManager.java b/sources/src/main/java/cz/zcu/kiv/offscreen/storage/FileManager.java
new file mode 100644
index 0000000..bae9042
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/storage/FileManager.java
@@ -0,0 +1,319 @@
+package cz.zcu.kiv.offscreen.storage;
+
+import java.io.*;
+import java.net.URI;
+import java.util.LinkedList;
+import java.util.List;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.io.FileDeleteStrategy;
+import org.apache.commons.io.FileUtils;
+import org.apache.log4j.Logger;
+
+/**
+ *
+ * @author Jindra Pavlíková <jindra.pav2@seznam.cz>
+ */
+public class FileManager {
+
+    private int MAX_FILE_SIZE = 512000000;
+    private int MAX_MEM_SIZE = 4 * 1024;
+    private static final String ACCEPTED_EXTENSION_FILE = "json";
+    private String storagePath;
+    private Logger logger = Logger.getLogger(FileManager.class);
+
+    public FileManager(String directoryName, String storageLocation) {
+        logger.trace("ENTRY");
+        this.storagePath = storageLocation + File.separator + directoryName;
+        logger.trace("EXIT");
+    }
+
+    public void createStorageDirectory() throws IOException {
+        logger.trace("ENTRY");
+        File storageDirectory = new File(this.storagePath);
+        FileUtils.forceMkdir(storageDirectory);
+        logger.trace("EXIT");
+    }
+
+    public boolean isExistStorage() {
+        logger.trace("ENTRY");
+        logger.trace("EXIT");
+        return new File(this.storagePath).isDirectory();
+    }
+
+    private boolean isAcceptedExtension(String componentName) {
+        return componentName.endsWith("." + ACCEPTED_EXTENSION_FILE);
+    }
+
+    public String saveFile(HttpServletRequest request) {
+        logger.trace("ENTRY");
+
+        boolean firstErr = true;
+        StringBuilder sb = new StringBuilder();
+        DiskFileItemFactory factory = new DiskFileItemFactory();
+        factory.setSizeThreshold(MAX_MEM_SIZE);
+        factory.setRepository(new File(this.storagePath));
+
+        ServletFileUpload upload = new ServletFileUpload(factory);
+        upload.setSizeMax(MAX_FILE_SIZE);
+
+        try {
+            // Parse the request to get file items.
+            List<FileItem> fileItems = upload.parseRequest(request);
+            File file;
+            for (FileItem fileItem : fileItems) {
+                if (isAcceptedExtension(fileItem.getName()) && fileItem.getSize() > 0) {
+                    logger.debug(fileItem.getName() + " - " + fileItem.getContentType());
+                    file = new File(this.storagePath + File.separator + fileItem.getName());
+                    fileItem.write(file);
+
+                } else if (fileItem.getSize() <= 0) {
+                	if (firstErr) {
+                        sb.append("<strong>Unsupported files:</strong><br/>");
+                        firstErr = false;
+                    }
+                	
+                	sb.append("&nbsp;&nbsp;&nbsp;File ");
+                    sb.append(fileItem.getName());
+                    sb.append(" was't uploaded. (File size is 0 B)<br/>");
+                	
+                } else {
+                    if (firstErr) {
+                        sb.append("<strong>Unsupported files:</strong><br/>");
+                        firstErr = false;
+                    }
+                    sb.append("&nbsp;&nbsp;&nbsp;File ");
+                    sb.append(fileItem.getName());
+                    sb.append(" was't uploaded.<br/>");
+                }
+            }
+
+        } catch (Exception ex) {
+            System.out.println(ex);
+        }
+
+        logger.trace("EXIT");
+        return sb.toString();
+    }
+
+    public void saveFile(InputStream inputStream, String fileName) throws IOException {
+        File file = new File(this.storagePath + File.separator + fileName);
+
+        if (isAcceptedExtension(file.getName())) {
+            BufferedInputStream in = new BufferedInputStream(inputStream);
+            FileOutputStream out = new FileOutputStream(file);
+
+            int length;
+            byte[] buffer = new byte[1024];
+
+            while ((length = in.read(buffer)) > -1) {
+                out.write(buffer, 0, length);
+            }
+
+            in.close();
+            out.close();
+        }
+    }
+
+    /**
+     * Gets list of uploded components file names in designated directory for
+     * current session.
+     *
+     * @return list of filenames
+     */
+    public List<String> getUploadedComponentsNames() {
+        logger.trace("ENTRY");
+        String[] extension = {ACCEPTED_EXTENSION_FILE};
+        logger.info(this.storagePath);
+
+        LinkedList<File> fileNames = (LinkedList<File>) FileUtils.listFiles(new File(this.storagePath), extension, false);
+        List<String> bundleNames = new LinkedList<String>();
+        for (File file : fileNames) {
+            bundleNames.add(file.getName());
+        }
+
+        logger.trace("EXIT");
+        return bundleNames;
+    }
+
+    /**
+     * Deletes file from storage.
+     *
+     * @param fileName
+     */
+    public void deleteFile(String fileName) {
+        logger.trace("ENTRY");
+        if (fileName == null) {
+            throw new NullPointerException("The parameter fileName is null!");
+        }
+        String path = this.storagePath + File.separator + fileName;
+        logger.debug("All path to delete file: " + path);
+        File filePath = new File(path);
+
+        if (filePath.isDirectory()) {
+            throw new IllegalArgumentException("The parameter fileName " + fileName + " can not be directory!");
+        }
+
+        if (!FileDeleteStrategy.NORMAL.deleteQuietly(filePath)) {
+            throw new IllegalStateException("The file " + fileName + " can not be deleted!");
+        }
+        logger.debug("File " + fileName + " was deleted.");
+
+        logger.trace("EXIT");
+    }
+
+    /**
+     * Deletes all files from storage.
+     *
+     * @throws IOException
+     */
+    public void deleteAllFiles() throws IOException {
+        logger.trace("ENTRY");
+
+        File dir = new File(this.storagePath);
+        if (dir.exists()){
+        	FileUtils.cleanDirectory(dir);
+        }
+
+        logger.trace("EXIT");
+    }
+
+    /**
+     * Convert file to URI.
+     * @return Return list of URI.
+     */
+    public URI[] convertFileToURI() {
+        List<File> files = this.getUploadedComponents();
+        logger.trace("ENTRY");
+        if (files == null) {
+            throw new IllegalArgumentException("Parameter List<File> files is null.");
+        }
+
+        URI[] filesURI = new URI[files.size()];
+        int i = 0;
+        for (File file : files) {
+            filesURI[i] = file.toURI();
+            i++;
+        }
+
+        logger.trace("EXIT");
+        return filesURI;
+    }
+
+    /**
+     * Gets list of absolute path uploaded components in designated directory
+     * for current session.
+     *
+     * @return list of absolute path uploaded bundles
+     */
+    public List<File> getUploadedComponents() {
+        logger.trace("ENTRY");
+        String[] extension = {ACCEPTED_EXTENSION_FILE};
+        logger.info(this.storagePath);
+        LinkedList<File> fileNames = (LinkedList<File>) FileUtils.listFiles(
+                new File(this.storagePath), extension, false);
+        logger.trace("EXIT");
+        return fileNames;
+    }
+    
+    /**
+     * Gets list of absolute path uploaded components in designated directory
+     * for current session.
+     *
+     * @return list of absolute path uploaded bundles
+     */
+    public List<File> copyUploadedComponents(String directory_name) {
+        logger.trace("ENTRY");
+
+        String[] extension = {ACCEPTED_EXTENSION_FILE};
+        logger.info(this.storagePath);
+        LinkedList<File> fileNames = (LinkedList<File>) FileUtils.listFiles(
+                new File(this.storagePath), extension, false);
+        List<String> bundleNames = new LinkedList<String>();
+        for (File file : fileNames) {
+        	
+        	File f2 = new File(directory_name + File.separator + file.getName());
+        	InputStream in;
+			try {
+					in = new FileInputStream(file);
+				
+	        	OutputStream out = new FileOutputStream(f2);
+	        	
+	        	byte[] buf = new byte[1024];
+	            int len;
+	            while ((len = in.read(buf)) > 0){
+	            out.write(buf, 0, len);
+	            }
+	            in.close();
+	            out.close();
+            
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+        }
+        
+        logger.trace("EXIT");
+        return fileNames;
+    }
+    
+    
+    /**
+     *
+     *
+     * @return list of absolute path uploaded bundles
+     */
+    public List<File> copyUploadedComponentsTo(String directory_name) {
+        logger.trace("ENTRY");
+
+        String[] extension = {ACCEPTED_EXTENSION_FILE};
+        logger.info(this.storagePath);
+
+        LinkedList<File> fileNames = (LinkedList<File>) FileUtils.listFiles(new File(this.storagePath), extension, false);
+        List<String> bundleNames = new LinkedList<String>();
+        for (File file : fileNames) {
+        	File f2 = new File(directory_name + File.separator + file.getName());
+        	InputStream in;
+
+			try {
+                in = new FileInputStream(file);
+	        	OutputStream out = new FileOutputStream(f2);
+	        	
+	        	byte[] buf = new byte[1024];
+	            int len;
+	            while ((len = in.read(buf)) > 0){
+	                out.write(buf, 0, len);
+	            }
+
+	            in.close();
+	            out.close();
+            
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+        }
+        
+        logger.trace("EXIT");
+        return fileNames;
+    }
+    
+    /**
+     *  Deletes a directory recursively from storage.
+     *
+     * @throws IOException in case deletion is unsuccessful
+     */
+    public void deleteDirectory() throws IOException {
+        logger.trace("ENTRY");
+
+        File dir = new File(this.storagePath);
+        if (dir.exists()) {
+        	FileUtils.deleteDirectory(dir);
+        }
+
+        logger.trace("EXIT");
+    }
+    
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/user/DB.java b/sources/src/main/java/cz/zcu/kiv/offscreen/user/DB.java
new file mode 100644
index 0000000..b7ce83c
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/user/DB.java
@@ -0,0 +1,107 @@
+package cz.zcu.kiv.offscreen.user;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+
+import javax.servlet.ServletContext;
+
+/**
+ * Class Db is useful for comunication with mysql database.
+ * 
+ * @author Daniel Bureš
+ *
+ */
+
+public class DB {
+	private Connection conn = null;
+	
+	/**
+	 * Constructor opens connection do database. Access data must be save in ServletContext as InitParameter( DbUrl, DbName, DbUser, DbPsw ).
+	 * 
+	 * 
+	 */
+	public DB(ServletContext context){	
+		    
+			try {
+				Class.forName("com.mysql.jdbc.Driver");
+				
+				conn = (Connection) DriverManager.getConnection(context.getInitParameter("DbUrl") + context.getInitParameter("DbName")+"?user="+ context.getInitParameter("DbUser") +"&password="+ context.getInitParameter("DbPsw") + "&useUnicode=true&characterEncoding=UTF-8");				
+				open();
+			} catch (ClassNotFoundException e) {
+				System.out.println("classnotfound exception");
+				e.printStackTrace();
+			} catch (SQLException e) {
+				
+				System.out.println("sql exception");
+				e.printStackTrace();
+			}
+	}
+	
+	/**
+	 * Method creates sql tables in database. And insert users: admin, user1, user2, user3
+	 */
+	public void open() throws SQLException{
+		//conn = (Connection) DriverManager.getConnection(serverName +"?user="+ userName +"&password="+ password + "&useUnicode=true&characterEncoding=UTF-8");
+		conn.setAutoCommit(true);
+		Statement stat = conn.createStatement();
+						
+	}
+	
+	/**
+	 * Method returns actual connection to database.
+	 * 
+	 * @return actual connection to database.
+	 */
+	public Connection getConn(){
+		return conn;		
+	}
+	
+	/**
+	 * Method execute sql query. Sql query can be INSERT, DELETE, UPDATE
+	 * @return count of affected rows
+	 * */
+	public int exStatement(String sql) {	
+		Statement stat;
+		
+		try{
+			stat = conn.createStatement();
+			return stat.executeUpdate(sql);
+		}catch(SQLException e){
+			e.printStackTrace();
+			return -1;
+		}catch (NullPointerException e){
+			e.printStackTrace();
+			return -2;
+		}	
+		
+	}
+	
+	/**
+	 * Method execute sql query like SELECT and returns affected rows as resultSet or Null. 
+	 * 
+	 * @throws SQLException 
+	 * @return ResultSet - data from database 
+	 */
+	public ResultSet exQuery(String sql){
+		Statement stat;
+		
+		try{
+			stat = conn.createStatement();
+			stat.execute(sql);
+			return stat.getResultSet();
+		}catch(SQLException e){
+			e.printStackTrace();
+			return null;
+		}catch (NullPointerException e){
+			e.printStackTrace();
+			return null;
+		}			 
+		
+		
+	}
+
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/user/Diagram.java b/sources/src/main/java/cz/zcu/kiv/offscreen/user/Diagram.java
new file mode 100644
index 0000000..4bbe053
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/user/Diagram.java
@@ -0,0 +1,251 @@
+package cz.zcu.kiv.offscreen.user;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+
+/**
+ * Class is usefull for saving and loading diagram params from database.
+ * 
+ * @author Daniel Bureš
+ *
+ */
+public class Diagram {
+	private DB db = null;
+	private int id = 0;
+	private ResultSet rs;
+	 
+	
+	public Diagram(DB db) {			
+		this(db,0);
+	}
+	
+	
+	public Diagram(DB db,int id) {
+		this.db = db;	
+		this.id = id;
+	}
+	
+	/**
+	 * Method returns object id.
+	 * 
+	 * @return id
+	 */
+	public int getId(){
+		return this.id;
+	}
+	
+	/**
+	 * Method returns id of object as string.
+	 * 
+	 * @return
+	 */
+	public String getIdStr(){
+		return Integer.toString(this.id);		
+	}
+	
+	/**
+	 * Method saves new diagram into database.
+	 * 
+	 * @param param - diagram parameters
+	 */
+	public void update(Map<String, String> param){
+		try {
+			if ( this.id  == 0 ) {
+				  
+				    String diagram_name = param.get("diagram_name")  ;
+				    String hash = param.get("hash")  ;  
+				    String component_count = param.get("component_count")  ;
+				    String user_id = param.get("user_id")  ;
+				    String public_diag = param.get("public")  ;
+				
+					String qy = "INSERT INTO diagram (id, created, user_id,component_count, name, session_id, hash,public ) " +
+										"VALUES ('0', NOW(), '"+user_id+"', '"+component_count+"', '"+diagram_name+"', '', '" + hash + "' , '" + public_diag + "' ) ";
+					Statement st = db.getConn().createStatement();
+					st.executeUpdate(qy, Statement.RETURN_GENERATED_KEYS);
+					ResultSet rs = st.getGeneratedKeys();
+					
+					if(rs.next()){							
+						this.id = rs.getInt(1);						
+					}					
+					
+				
+			}else{
+				    String diagram_name = param.get("diagram_name")  ;
+				    String component_count = param.get("component_count")  ;
+				    String public_diag = param.get("public")  ;  
+				
+					String qy = "UPDATE diagram SET component_count = '" + component_count + "', name = '"+diagram_name+"', public = '"+public_diag+"' " + 
+										" WHERE id= '" + this.id + "'";
+					Statement st = db.getConn().createStatement();
+					st.executeUpdate(qy, Statement.RETURN_GENERATED_KEYS);
+					ResultSet rs = st.getGeneratedKeys();
+
+			}
+					  
+			
+		
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}		
+	}
+	
+	/**
+	 * Method deletes diagram from database.
+	 */
+	public void delete(){
+		String qy = "DELETE FROM diagram WHERE id = '"+ this.id+"' LIMIT 1";
+		
+		db.exStatement(qy);
+						
+		
+	}
+	
+	/*
+	public void updateViewport(String viewport_html){
+		String qy = "UPDATE diagram SET viewport_html = '"+ viewport_html+"' WHERE id = '"+ this.id+"' LIMIT 1";
+		try {
+			db.exStatement(qy);
+						
+		} catch (SQLException e) {
+			
+			e.printStackTrace();
+		}
+	}
+
+	public void updateRightpanel(String rightpanel_html){
+		String qy = "UPDATE diagram SET rightpanel_html = '"+ rightpanel_html+"' WHERE id = '"+ this.id+"' LIMIT 1";
+		try {
+			db.exStatement(qy);
+						
+		} catch (SQLException e) {
+			
+			e.printStackTrace();
+		}
+	}*/
+	
+	/**
+	 * Method updates vertices position in database. Position of vertices are saved in json.
+	 * 
+	 * @param vertices_position_json
+	 */
+	public void updateVerticesPosition(String vertices_position_json){
+		String qy = "UPDATE diagram SET vertices_position = '"+ vertices_position_json+"' WHERE id = '"+ this.id+"' LIMIT 1";
+		
+			db.exStatement(qy);
+						
+		
+	}
+	
+	/**
+	 * Method returns parameters of diagram.
+	 * @param diagram_id
+	 * @return
+	 */
+	public Map<String,String> getDiagramParam(int diagram_id){
+		HashMap<String, String> item_map = new HashMap<String, String>();
+		String qy = "SELECT * FROM diagram WHERE id = '"+diagram_id+"' ORDER BY created DESC ";
+		try {
+			rs = db.exQuery(qy);			
+			while ( rs != null && rs.next() ) {
+				
+				
+				item_map.put("id", String.valueOf(rs.getInt("id")) );
+				item_map.put("name", rs.getString("name")  );
+				item_map.put("hash", rs.getString("hash")  );
+				item_map.put("public", String.valueOf(rs.getInt("public")) );
+				item_map.put("user_id", String.valueOf(rs.getInt("user_id")) );
+				item_map.put("vertices_position", rs.getString("vertices_position")  );
+				item_map.put("component_count", String.valueOf(rs.getInt("component_count")) );
+				item_map.put("created", Util.formatDate(rs.getString("created") ) );
+				item_map.put("session_id", rs.getString("session_id") );
+				
+				
+			}
+			
+		} catch (SQLException e) {
+			
+			e.printStackTrace();
+		}
+		
+		return item_map;
+		
+	}
+	
+	/**
+	 * Method returns list of digrams, which are uploaded by user.
+	 * 
+	 * @param user_id
+	 * @return
+	 */
+	public ArrayList<Map<String,String>> getDiagramListByUserId(int user_id){		
+		ArrayList<Map<String,String>> diagram_list = new ArrayList<Map<String,String>>();
+		String qy = "SELECT * FROM diagram WHERE user_id = '"+user_id+"' ORDER BY created DESC ";
+		try {
+			rs = db.exQuery(qy);			
+			while ( rs != null && rs.next() ) {
+				HashMap<String, String> item_map = new HashMap<String, String>();
+				
+				item_map.put("id", String.valueOf(rs.getInt("id")) );
+				item_map.put("name", (rs.getString("name").length()==0?"No name":rs.getString("name"))  );
+				item_map.put("public", String.valueOf(rs.getInt("public")) );
+				item_map.put("component_count", String.valueOf(rs.getInt("component_count")) );
+				item_map.put("hash", rs.getString("hash")  );
+				item_map.put("created", Util.formatDate(rs.getString("created") ) );
+				item_map.put("session_id", rs.getString("session_id") );
+				
+				diagram_list.add(item_map);
+			}
+			
+		} catch (SQLException e) {
+			
+			e.printStackTrace();
+		}
+		
+		return diagram_list;
+		
+	}
+	
+	
+	/**
+	 * Method returns list of public diagrams.
+	 * @return
+	 */
+	public ArrayList<Map<String,String>> getDiagramPublicList(){
+		
+		ArrayList<Map<String,String>> diagram_list = new ArrayList<Map<String,String>>();
+		String qy = "SELECT * FROM diagram WHERE public = 1 ORDER BY name ASC ";
+		try {
+			rs = db.exQuery(qy);			
+			while ( rs != null && rs.next() ) {
+				HashMap<String, String> item_map = new HashMap<String, String>();
+				
+				item_map.put("id", String.valueOf(rs.getInt("id")) );
+				item_map.put("name", (rs.getString("name").length()==0?"No name":rs.getString("name"))  );
+				item_map.put("public", String.valueOf(rs.getInt("public")) );
+				item_map.put("component_count", String.valueOf(rs.getInt("component_count")) );
+				item_map.put("hash", rs.getString("hash")  );
+				item_map.put("created", Util.formatDate(rs.getString("created") ) );
+				item_map.put("session_id", rs.getString("session_id") );
+				
+				diagram_list.add(item_map);
+			}
+			
+		} catch (SQLException e) {
+			
+			e.printStackTrace();
+		}
+		
+		return diagram_list;
+		
+	}
+	
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/user/Log.java b/sources/src/main/java/cz/zcu/kiv/offscreen/user/Log.java
new file mode 100644
index 0000000..73c92a0
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/user/Log.java
@@ -0,0 +1,121 @@
+package cz.zcu.kiv.offscreen.user;
+
+import com.mysql.jdbc.PreparedStatement;
+import java.sql.Connection;
+import java.sql.Date;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.servlet.ServletContext;
+
+/**
+ * Class is usefull for saving and loading diagram params from database.
+ *
+ * @author Daniel Bureš
+ *
+ */
+public class Log {
+    private DB db = null;
+    private int id = 0;
+    private ResultSet rs;
+
+
+    public Log(DB db) {
+        this(db, 0);
+    }
+
+
+    public Log(DB db, int id) {
+        this.db = db;
+        this.id = id;
+    }
+
+    /**
+     * Method returns object id.
+     *
+     * @return id
+     */
+    public int getId() {
+        return this.id;
+    }
+
+    /**
+     * Method returns id of object as string.
+     *
+     * @return
+     */
+    public String getIdStr() {
+        return Integer.toString(this.id);
+    }
+
+
+    public int createLog(Map<String, String> param) {
+        String idUser = param.get("user_id");
+        String idDiagram = param.get("id_diagram");
+        String event = param.get("log_event");
+        String delay = param.get("log_date_delay");
+        String jar = param.get("change_jar");
+        String userName = param.get("user_name");
+        String newVersion = param.get("new_version");
+        Connection con = db.getConn();
+        PreparedStatement pstmt;
+        try {
+            pstmt = (PreparedStatement) con.prepareStatement("INSERT INTO log(id_user,user_name,id_diagram,event,date,date_delay,change_jar,new_version) VALUES "+
+                    "(?,?,?,?,?,?,?,?)");
+            pstmt.setInt(1,Integer.parseInt(idUser));
+            pstmt.setString(2,userName);
+            pstmt.setInt(3,Integer.parseInt(idDiagram));
+            pstmt.setString(4,event);
+            Date date2 = new Date(System.currentTimeMillis());
+            pstmt.setDate(5,date2);
+            Date date=null;
+            if(delay!=null){
+               date = new Date(Integer.parseInt(delay));
+            }
+            pstmt.setDate(6,date);
+            pstmt.setString(7,jar);
+            pstmt.setString(8,newVersion);
+            return pstmt.executeUpdate();
+        } catch (SQLException ex) {
+            Logger.getLogger(Log.class.getName()).log(Level.SEVERE, null, ex);
+            return -1;
+        }
+
+            
+//        return db.exStatement(qy);
+    }
+    public List<Map<String,String>> readLogs(int idDiagram){
+        List<Map<String,String>> diagram_list = new ArrayList<Map<String,String>>();
+        String qy = "SELECT * FROM log WHERE id_diagram = '"+idDiagram+"' ORDER BY date ASC ";
+        try {
+            rs = db.exQuery(qy);
+            while ( rs != null && rs.next() ) {
+                HashMap<String, String> item_map = new HashMap<String, String>();
+                item_map.put("id", String.valueOf(rs.getInt("id")));
+                item_map.put("user_id", String.valueOf(rs.getInt("id_user")));
+                item_map.put("user_name", String.valueOf(rs.getString("user_name")) );
+                item_map.put("diagram_id", String.valueOf(rs.getInt("id_diagram")) );
+                item_map.put("log_date", Util.formatDate(rs.getString("date")) );
+                item_map.put("log_event", String.valueOf(rs.getString("event")) );
+                String str = String.valueOf(rs.getString("date_delay"));
+                if(str!=null) str = Util.formatDate(str);
+                item_map.put("log_date_delay", str);
+                item_map.put("change_jar", rs.getString("change_jar"));
+                item_map.put("new_version", String.valueOf(rs.getString("new_version") ) );
+                diagram_list.add(item_map);
+            }
+
+        } catch (SQLException e) {
+
+            e.printStackTrace();
+        }
+
+        return diagram_list;
+
+    }
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/user/User.java b/sources/src/main/java/cz/zcu/kiv/offscreen/user/User.java
new file mode 100644
index 0000000..82eba01
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/user/User.java
@@ -0,0 +1,267 @@
+package cz.zcu.kiv.offscreen.user;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+
+/**
+ * Class CUser is used for creating, updating or loading user from database.
+ *
+ * @author Daniel Bureš
+ *
+ */
+public class User {
+	private DB db = null;
+	private int id = 0;
+	private ResultSet rs;
+	private Map<String,String> paramStr = new HashMap<String,String>(10);
+
+
+	/**
+	 * Constructs object, where is saved db connection.
+	 */
+	public User(DB db) {
+		this(db,0);
+	}
+
+	/**
+	 * Constructs object, where is saved db connection and user id. User, who has this id is loaded from database.
+	 */
+	public User(DB db, int id){
+		this.db = db;
+		this.id = id;
+
+		if(id > 0){
+			load();
+		}
+
+	}
+
+	/**
+	 * Method loads user from database. User is loaded by his id, which must be saved in object of this class.
+	 */
+	public void load(){
+		String qy = "SELECT * FROM user WHERE id = '"+this.id+"' ";
+		try {
+			rs = db.exQuery(qy);
+			if ( rs != null && rs.next() ) {
+				this.id = rs.getInt("id");
+
+
+				paramStr.put("nick", rs.getString("nick")  );
+
+			}else{
+				this.id = 0;
+			}
+
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+
+	}
+
+
+	/**
+	 * Method sets session for current user and save session to database.
+	 *
+	 * @param session
+	 */
+	public void setSession(String session){
+		if(id > 0){
+			String qy = "UPDATE user SET session='"+session+"' WHERE id='"+ this.id +"'";
+			db.exStatement(qy);
+		}
+	}
+
+	/**
+	 * Method try to login user by his nick name and password. If login is OK then returns true else  returns false;
+	 *
+	 * @param nick
+	 * @param psw
+	 * @return true - login ok
+	 * 		   false - login failed
+	 */
+	public boolean login(String nick, String psw){
+		String qy = "SELECT * FROM user WHERE nick LIKE '"+nick+"' AND psw LIKE '"+Util.MD5(psw)+"' AND active = '1' LIMIT 1";
+		try {
+			rs = db.exQuery(qy);
+			if ( rs.next() ) {
+				if(rs.getInt("id") > 0){
+					this.id = rs.getInt("id");
+					load();
+					return true;
+				}
+			}
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+
+
+		return false;
+	}
+
+
+
+	public void register(Map<String, String> param){
+		try {
+				if ( this.id  == 0 ) {
+
+					String qy = "INSERT INTO user (id,created,active, nick,name, psw,session,email) " +
+										"VALUES (	'0', " +
+										"			NOW(), " +
+										"			'1', " +
+										"			'" + param.get("nick") + "',"+
+										"			'" + param.get("name") + "',"+
+										"			'" + Util.MD5(param.get("password")) + "'," +
+										" 			'" + param.get("session") + "',"+
+										" 			'" + param.get("email") + "' ) ";
+					Statement st = db.getConn().createStatement();
+					st.executeUpdate(qy, Statement.RETURN_GENERATED_KEYS);
+					ResultSet rs = st.getGeneratedKeys();
+
+					if(rs.next()){
+						this.id = rs.getInt(1);
+					}
+				}
+
+			} catch (SQLException e) {
+				e.printStackTrace();
+			}
+
+	}
+
+	/**
+	 * Method saves parameters into database. if is not loaded user then is created new User.
+	 *
+	 * @param param - parameters to save
+	 * @param cx
+	 */
+	public void update(Map<String, String> param,ServletContext cx){
+		try {
+			if ( this.id  == 0 ) {
+
+					String qy = "INSERT INTO user (id,created,active) " +
+										"VALUES ('0', NOW(), '1' ) ";
+					Statement st = db.getConn().createStatement();
+					st.executeUpdate(qy, Statement.RETURN_GENERATED_KEYS);
+					ResultSet rs = st.getGeneratedKeys();
+
+					if(rs.next()){
+						this.id = rs.getInt(1);
+					}
+
+
+			}
+
+			String tmp_info = param.get("info");
+			tmp_info = tmp_info.replaceAll("\\<","&lt;");
+			tmp_info = tmp_info.replaceAll("\\>","&gt;");
+			tmp_info = tmp_info.replaceAll("\\n","<br \\/>");
+			param.put("info",tmp_info);
+
+
+			db.exStatement(	"UPDATE user " +
+							"SET  email = '"+param.get("email")+"',"+
+								  "nick = '"+param.get("nick")+"',"+
+								  (param.get("noSavePsw")!=null?"":",psw = '"+param.get("psw")+"' " )+
+								  (param.get("active")!= null && Integer.valueOf(param.get("active")) >= 0 ? ",active = '" + param.get("active") + "'": "" )+
+								  " WHERE id = '" + this.id +"'");
+
+
+
+
+
+		} catch (SQLException e) {
+			cx.setAttribute("DEBUG", "e " + e.getMessage() + " state: "+e.getSQLState() + " sqlerrcode" + e.getErrorCode());
+
+			e.printStackTrace();
+		}
+
+	}
+
+
+	/**
+	 * Returns id of loaded user.
+	 *
+	 * @return int
+	 */
+	public int getId(){
+		return id;
+	}
+
+	/**
+	 * Returns loaded parameters, which are saved in Map<String,String>.
+	 * @return Map<String,String> loaded parameters, which are saved in Map<String,String>.
+	 */
+	public Map<String,String> getParam(){
+		return paramStr;
+	}
+
+	/**
+	 * Method returns nick of loaded user.
+	 * @return
+	 */
+	public String getNick(){
+		return paramStr.get("nick");
+	}
+
+	/**
+	 * Method checks if exists user with nick.
+	 * @param testNick
+	 * @return
+	 */
+	public boolean existsNick(String testNick){
+		boolean exists = false;
+
+		String qy = "SELECT * FROM user WHERE LOWER(nick) LIKE '"+testNick.toLowerCase()+"' LIMIT 1";
+		try {
+			rs = db.exQuery(qy);
+
+			if ( rs.next() ) {
+				if(rs.getInt("id") > 0){
+					return true;
+				}
+			}
+
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+
+		return exists;
+
+	}
+
+
+	/**
+	 * Method checks if user exists by him e-mail.
+	 *
+	 * @param testEmail
+	 * @return
+	 */
+	public boolean existsEmail(String testEmail){
+		boolean exists = false;
+
+		String qy = "SELECT * FROM user WHERE LOWER(email) LIKE '"+testEmail.toLowerCase()+"' LIMIT 1";
+		try {
+			rs = db.exQuery(qy);
+
+			if ( rs.next() ) {
+				if ( rs.getInt("id") > 0 ) {
+					return true;
+				}
+			}
+
+		} catch (SQLException e) {
+			e.printStackTrace();
+		}
+
+		return exists;
+
+	}
+
+
+
+}
diff --git a/sources/src/main/java/cz/zcu/kiv/offscreen/user/Util.java b/sources/src/main/java/cz/zcu/kiv/offscreen/user/Util.java
new file mode 100644
index 0000000..017b4ce
--- /dev/null
+++ b/sources/src/main/java/cz/zcu/kiv/offscreen/user/Util.java
@@ -0,0 +1,53 @@
+package cz.zcu.kiv.offscreen.user;
+
+import net.sf.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class Util {
+	
+	
+	
+	/**
+	 *	Method do a hash code from string.
+	 *
+	 * @param md5 - String to hash
+	 * @return String - hashcode 
+	 */
+	public static String MD5(String md5) {
+		   try {
+		        java.security.MessageDigest md = java.security.MessageDigest.getInstance("MD5");
+		        byte[] array = md.digest(md5.getBytes());
+		        StringBuffer sb = new StringBuffer();
+		        for (int i = 0; i < array.length; ++i) {
+		          sb.append(Integer.toHexString((array[i] & 0xFF) | 0x100).substring(1,3));
+		       }
+		        return sb.toString();
+		    } catch (java.security.NoSuchAlgorithmException e) {
+		    }
+		    return null;
+	}
+	
+	
+	public static String formatDate(String date){	
+		String pattern = "(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2}).*";
+		Pattern pat = Pattern.compile(pattern);
+		Matcher matches = pat.matcher(date);
+		String formatedDate = "";
+		
+		if(matches.find()){			
+			formatedDate = matches.group(3) + "." + matches.group(2) + "." +  matches.group(1) + " " + matches.group(4) + ":" +  matches.group(5);			
+		}
+		
+		return formatedDate;
+	}
+
+	
+	
+	
+	
+}
