cleanup and added variables to calculates page