Oh yes! Thank you, excellently explained. Sorry for making mistakes in explaining, makes it alot harder to understand. And yes, it is true that it's easy to get lost, especially while learning other concepts it was a "bad" example. I actually thought it would be quite simple at first, but there was quite a few complications, so it got more advanced than I thought at first! Will take note to post better (Or atleast correct!) explanation next time.

So to poster:

Use Jonnys example if you want to learn other concepts, keeping this one simple. Otherwise I think you can learn much by testing out the code I posted.

PS: Well, not totally new but still new enough to come up with a lot of pretty horrible designs!