Added support for extension flags and html flags. Renamed ___ to context.