Improved database module