Remove $qi and $fp which are not used