Split mainpage into Windows, WP, and common code so we can have different UIs