Minor refactoring
Added support for numberic character references.