Added extraction operator and fixed insertion operator