Restructuring Legacy Software Systems