extracted uri parser and added specs for the same