refactoring the data binding code so that the data bind with nodes as a whole, rather than binding with links/marks seperately