Moved alot of stuff to switch rules and general fixes/improvements