Javadoc: ancestor() includes the specified ancestor.
Added support for primitive type char.
Added better exception msg when something goes wrong at registration.