Small fixes following the refactoring. The WebSQL test still fails though.