Added serialisation of model into text area