Saving data to database. Crappy mechanism, but I'll fix it in future commit.