Change the tabs into spaces for better readability. Changed the url getter into a closure. Some more comments