Limited the number of files read from the database in the gui.
And fixed the search files method.