Simplified the script - removed all code related to installing, modifying /etc/ configuration etc.