*Database extensions refactored and added some new functions.