MOVED ALL VARIABLES TO THE TOP OF THE CODE