Removed NOP's optimization that did not work
Extended dead code elimination to more while conditions