Added a setup script and a few minor improvements