Added "clone repository" feature (and cleaned code a bit)