Removing unnecessary and cleaning code