optimizations and modifications for ROM updates

This reverts commit 3c3c63149c8fa78beb5f21c0bd9d354c439c4883.

Change-Id: I72df85643b562ea4e799d7a1664e41fc5bdbed0b