Fix some of the roundtrip-test breakage

roundtrip-test was left in a pretty broken state after the config fetching
patch, which killed our rt testing.

During debugging, I also cleaned up most JSHint warnings and simplified a few
signatures to make use of the env.page information.

Change-Id: I8e27a897ef882635ed1fc79168aa705dbe8e3f71