Reimplemented state builder using computation expression.
Fixed unit tests.
Migrated code from test to actual.