Modified the handlers to simplify them.
More changes to the id handler.