Refactoring and adding title to spreadsheet