Module setup, better bindings, state defs