remove hidden stuff - keep unique keys