Revised tokenizer and dom tree builder. Removed the expected module to be replaced with something more flexible.