Fixed some bugs, added an install script, and updated the README.