Spit Ruby code into smaller parts, add STATES_MAP