code clean up and additional text transition math