Changed Op class to be abstract and added case classes for different types