Update install.sh

Major update, adding multi instance support and fixing minor issues.