Various Changes

lookup function now returns array, instead of using global variables.
lookup function now supports state and country values