big update: add pulse fitter, clean/fix/restructure src