fixes to view and controller. Fixed factory initialization issues