Implements a more modular version of FizzBuzz.