Removed compact()/flip() pairs as they aren't doing anything useful.