Added customer class and extracted duplicate code from other classes.