CoffeeANdHeuristics with checking on brew function

Added checks to see if the the machine was in an appropriate state to
brew a new pot of coffee.