Refactor url retrieval and improve styling