Extract the repeat codes between masterchief and cortana to a abstract class call daemond