Remove some unnecessary scope variables