Fixed arrow notation for mainLoop function definition.