Added option for specifying URL root prefix; Bug fixes both in code and in tests; all tests passing now