added generic repository and impl.
converted download<> variable to conditional variable such as sed and
based the http download on its value