Allowing callbacks to be used instead of Element classes.

Fixes #25.