urls and handlers refactored