Added files and Changes to Database.php

Fixes applied.