Worksheet.js cleaning and refactoring