[Shim] Fix and cleanup