Refactored installer script
Added preflight checks. Reworked install section. Fixed bug when
settings were already in DB.