Added more flexibility in rate parameters, added neatly formatted output rather than raw XML conversion.