Replaced Object.keys usage with counters and added get_unrecognized()