Fixed errors due to explicit rational constructor.
Added ref-qualifiers to operator= of several classes.