Added init function and state for systems.