Fix magic numbers, extra param references