Added full db support, needs testing