Added teacher list and improved code structure