Abstract rewrite (closes #15)

The previous abstract was a bit confusing.
Merge pull request #22 from cdumez/abstract_rewrite

Abstract rewrite (closes #15)