Fixing a few of the bugs around saving, and replacing spaces with tabs to
match