Added replaceContent function for Ctrl_view to get rid of repeated switch case.