Properly scope them variables