added error.js for custom errors
many changes to client module, started integration tests
made integration.js slightly less ghetto
Merge pull request #97 from dannycoates/integration

Began implementing integration tests