Added a working birf example. Reworked view state handling to use the new state machine package.