Refactoring Spreadsheet controllers