Added TODO's, changed getClass() to MyVertex.class since getClass() returned the private inner class instead.