Added word removal code, and made some changes to remove bugs

Changed some code to allow for word-removal, removed some debug code,
and removed bugs