setup various components, state module should likely be renamed