Finalised the work with the visualiser (right now commented)