Correct minor bugs around over escaping
Refactor fileContext more cleanly