A Flexible Framework For Ephemerides Calculations