Minimize and re-structure solution