Added functions that handle communication with the web service to the library (not tested yet, very few comments)