Added states config and more events