Added trim_user support to the config classes and the url generator

I also happened to remove some unused imports and set a list to a specific initial size.