Refactor

case class ExitCommand()

to

case object ExitCommand
Refactor

lift(0) => headOption