fixed whitespace nit
using object.create(null) instead of {} to avoid prototype bleeding
inlined function areCharsSimilar