Oh right ok I left out the new keyword...so shoot me. Well done for spotting it...

So what you need to do is to put some alerts in the code to see what is happening and what is initialising. That is the easiest way to debug, and you will find your errors.