Takes 1000 questions and change logic of database

It read all the txt files and inputs the info in the database and
changed the logic of how it check whether there are questions or not in
the database.
Fixed merging problems