Started debugging the document writer class, specifically the thread
management. Also added a first framework for a preferences dialog