Added GetVal for fetching values from URLS.

Various minor changes.
Added a few helperfunctions
Merged the new and old
Some refactoring