removing usages of $wpdb where declared but never used

Fixes for #144 and #155.

Just removes usages of `$wpdb` where it was declared but never used in the function. I don't see a reason for it to be there.