1. cleanup
2. implementing register shadowing required for register tracing