add some simple heuristic optimizations