Initial checkin based on template (which was in turn based on example-sim)