Multiple data averaging windows and gcc fixes.