Add basic structure for generalization. Fill in later.
Remove probably unnecessary variables from run.