Small tidy up

- Tidy up the way scope is managed.
- Remove the check for whether the layer is a DOM node (there are [valid use cases](https://github.com/matthew-andrews/selective-fastclick/) where it might not be).
- Use local variables for device checks.
- Whitespace.