Move Homebrew functionality into a class