Refactor some set but unused vars in the frontend

Self explanatory, but none are actually bugs.