simplify storage code
fix Fatal call in tests
add some more tests
fix page preview