bunch of fixes

I am not sure if you have pending changes, but these are the mods I had to do to get this (lovely) module working for me.

Thanks!

-jv