Updated Main.js for Spinning Setup