Updated Codes to Support Nil Keys