Changed all errors to be instances of Error instead of plain strings. Makes debugging a lot easier.
Merge pull request #74 from sebastianseilund/master

Changed all errors to be instances of Error instead of plain strings (second try)