Refactor: Initialize variables, localize variables