Some Re factoring