Implemented code in Main and ListController.