made settings a dictionary
changed url pattern handling