Modularized user's search_code into module