Added *clone repository* feature (and cleaned some code)