branch mw4: minor cleanup and code validation