Add pattern record feature. Move view_stats from view data to startMenu.
TODO: implement view_pattern.