#14: Add a check to the node type and view mode 

This needs to be done before setting up the $program variable. Programs are specific to events.

Fixes #14