Structure Theorems and Algorithms