Refactor teachers views