Started adding simulator code