Added original source
First additions

- use macro for errors (inconsistent for the moment)
- Use provided values for endpoints instead of hardcoded ones

Works better than before but still not functional