There is a lot going on in that project for people to get their heads around. Always helps if the posted example is simplyfied and just contains whats needed to explain further.
So any way I am not sure whats supposed to happen in all that but this may help you