fixed bug #6 by moving things out of the pageshow function, everything basically works again except bonus game but probably for other reasons