created customer factory, refactored controllers and views