Code cleaning pass #1