Replication abstraction

This abstracts api.replicate call. Next on the list I think would be argument parsing for the various api calls and then task queuing, unless you have another idea.