Split SimState from Sim and moved entity related stuff to other files