fix url parsing bug
refactoring; adding devtest mode