Bugfixes
Added database api