switched to json files; improved word replacement; rewritten entire code