updated some argument types to const ref's
implemented more robust way of drawing connections based on actual information from nodes