Code refactored, added URLService