Code cleanup
Prepare for flow-insensitive branch