initial checkin of lightcurve fitting routines