Worked on simulation logic.  Added comments.