Fixed #8. Javascript errors if model not initially defined.
Changes to private.xml.