Overhaul of structure analysis etc.