Converted array keys to constants. Added "keyHasValue" helper method. Modified some method signatures to match method names.