Refactor edge drawing

Change: encapsulate edge drawing in Edge class.