fix for wpdb connection getting screwed up on install, cleanup, added licence