Code from labs and class.