Added test for inserting word; fixed some files to fit PEP8