WIP: testing of next function; solve some TODOs
WIP: solve one of TODOs (correct end of next); ALERT in specific message

This will not be correct after deserialization (there will be pos at the begging)
FIX: read header, coorect method reset_next