Made 1 function to intialize SearchCtrl, PreloadCtrl and HistoryCtrl