Refactored into Remote Service

Should have done multiple commits - was hard to do so.