Added debian/ubuntu compatibility to setup.sh Also cleaned up a lot of coded and added checks to make it a bit more friendly.