Pushing missing commit for the menu selection fix.
Added comments and licensing headers.