Throw a more sensible ArgumentException.
Handle more system register R/W events and clean up related code.

Fixes #20.