form on search page complited
Main controller refactored