Prevents default actions for events

Fixes #200 and #208. Tests I'll give later.