Fixed .xml, implemented database inserts.