Add the ident function and some tests.