Refactoring brew updater/installer, adding bash best practices