Fix test failures

Merged in the changes from @viveksjain and fixed any test failures that came up.
See our discussion [here](https://github.com/endor/kettu/pull/86#issuecomment-11890864).