large refactory for possible AsciiDoc support. Needs to implement AsciiDocTab