Fixed request error callback
Fixed whitespace in endpoints
Added some optional stuff
Added proper tests, more to come