cleanup layout and language span highlighting