Add guard clauses to install script and reorganize