remove some obsolete variables and calculations