Simplified the database by creating a module