Testcases for reading from URL and refactors.
Testcases for the static main methods.
Added CliHandler, small refactors.
Small refactors.