CLEANUP: Cleaned up the database interface
CLEANED: cleaned up the regex
CLEANED: Cleaned up the utility functions