Added some more initialization, and an iteration through the sentences