Moved graph drawing to seperate class