Added database and text file support