fixed students index and cleaned some code