Event handlers setup
Add node colour code ported