Seperate out writing, remove cycle in Problem objects