More refactoring. Fixed up layouts.