Finished the visualisation

Still needs comments and a little tidying up.