Graph sturcture done
Algorithm works needs tidying