Removing unnecessary copied code