Refactoring
Added type parameter to GraphItem to prevent different types of
GraphItem to be added to each other.