eliminated bad code

Decided to adopt JGraph instead of design my own solution.