Now publishing on a separate thread. Successfully updates preview when
saving and loading. Probably needs a bit of refactoring. Definitely
needs a better text editor and some syntax checking.