Renamed the global variables to reflect their actual meaning
Removed hard-coding from table name, WP_TABLE_PREFIX defines the WordPress table prefix