Turned out this was rather easy!
I have re-uploaded the source (same link as before), it contains 2 new functions.
One generates a random level, and the other stores that to an array.
Check my comments for more info
regards,
(PS: loading images was ofcourse already available, but wrapped in a quick function, you'll have to write your own pieces of code based on this to expand it)