Added URL search. Splited logic in files