Merge pull request #1 from VeriTi/thread-swap

Change background thread to do writing instead of parsing.