horribly poor solution to parsing URLs. This asynch stuff is hard