fixing small bugs, and adding install script