Hello I have a PostgreSQL 9.1 database with such tables [tables are simplified]

For now I use only tables: account, account_word and word. But I wanted to add groups of words into my database. So I created tables wordgroup and wordgroup_word. Now my table account_word is no longer needed so I would like to move all words from account_word to wordgroup_word. In general:
I would like to move all account's word to his wordgroup where group's "is_all" is true and then delete account_word table
Could someone help me to achieve this?
Cheers