improve functions for adding and removing repository
Improve adding function. Add two cmd functions