in the first few lines you add objects to lists and the access them via index [0]. you are aware that this only is correct if the list was empty before?
otherwise the appended(!) objects will be found at [size()-1].
I suggest you setup the objects first and then append them. This is a tiny bit faster and saves you the chance of getting the index wrong.

HTH