Added States

Updated a lot of core code