Percentage calc fix and cleanup

Important to store result of division in a floating point data type!