Restructured a bit and now it writes to the DB. Yay!
Lots of fixes to stuff.
Fix import/export precision to avoid floating point math errors.