Moving readonly checks into handlers.

Fixes #253
Fixes #157