US5987: Fixes and cleanup