If I had to summarize this in fewer points:
• Keep similar conditions during studying and testing. This includes environmental surroundings, mental and physiological state, the way you think about the material, and so on. But if you want to remember this outside of class, study in a VARIETY of conditions, so that you don't associate the material with any particular condition.
• Study briefly and frequently, and sleep.
But one other good point I would add is this:
• Take notes BEFORE class if possible, and add to them whenever necessary. Do this by reading the textbook chapters ahead of time (and take notes; refer to your syllabus to find out which chapter is next, if applicable) or see if your teacher posts Powerpoints online ahead of time. This way, you're not just frantically writing notes in class and you'll actually be able to more fully pay attention to what the teacher is saying (remember: attention is the first step of the memory process!). You may think you can pay attention to the professor as you're writing, but you are actually dividing your attention and hurting your memory.