Add scripts and refactor install script