updated lib
moved validate_nosql_key to lib