TODOs, comments, typos, path handling, some refactoring.