Refactored specs. Fixes #17.