Adding more oop and generic functions for cs61a