First part of simulator done.