Refactors, change arguments, pass remote directory.