Add setter for endpoint and rewrote 'endpoint' consistently
Added some docblocks, added optional endpoint to constructor and fixed undefined class Exception so it uses global namespace
Merge pull request #6 from dennisdegreef/makeEndpointConfigurable

Make endpoint configurable