Final code cleanups/fixes for replace in files