General refactoring
Fix bug in Server parsing request uri
Make backwards compatible detect server config