Improve abstraction

Fix #7