Close issue #6

Everything seems to work, though the hooks aren't tested yet.