Slight restructuring, also changed words.txt to a native JSON file.