9cb070f9c0
and misc cleanup Cherry-picked from #1477 Closes #1402 Authored by: flashdagger
and misc cleanup Cherry-picked from #1477 Closes #1402 Authored by: flashdagger