Added safeguards in case no mode is set
Moved mode setting out of monitors

This commit introduces the ws_monitor_mode object, which allows you to set a
mode and then use it. This way, unusual modes can also be implemented easily.
Merge pull request #195 from TheNeikos/move-modes_out_of_monitor

Move modes out of monitor