cleaned up systemstate in preperation of it being used