add leads_controller and subsequent files and some functions