Added fold. There are worrying performance issues on longer files.