get rid of some dead code
Better static_eval logic, major perf improvement