Refactored the parsing to allow multiple kv pairs

Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>