Refactor router, gravatar