cleanup some unused variable references

@stflory should be a quick merge