Extract common bits
Use locals in partial
Use locals in partial
Use locals in partial
Use locals in partial
Use locals in partial
Use locals in partial
Use locals in partial