Extract Rational to external class file