Mostly working sim and working tests