Better url handling and constructor replace