Rearranging and declaring variables