Refactor & add install script