adding specs and starting to factor out the url stuff