Fix wrong type parsing
Improve persistence and seen management