Improved Database module