refactor global wpdb references, remove URI fragment option