refactoring and adding in support for scratchpad folder
fixing bugs
Reverting reinstall command