Added States package, rearranged logic to fit in proper classes.