many small fixes
issue #2
don't rely on the "intelligent guess" for the data type
simple paging for gallery added