Take input array keys instead of internal fields.

Signed-off-by: Guillaume Poirier-Morency <guillaumepoiriermorency@gmail.com>