major db structure overhaul and added basic attribute saving and updating