Added a constructor accepting NSURL as parameter