improve type detection
fix date detection
fix tests and rowid endpoint