Binary reader, working, but not clean
Added sorting and removing duplicates