Added endpoint collision and the advancing to next levels.