Optimizer abstract class

changed format so that each optimizer type extends a base optimizer clas