FIxed some errors and added work with remote service