I moved them down because otherwise I was getting odd issues with the global variables not functioning properly..