Refactoring

See #110
Refactoring

See #110
Changes run_actions to accept callback instead of state

See #110