constants update and dead code removal