Fix memory leak.
Use consistent member variable naming.
Register history with backend.

Fixes #4.