added loss function + uniformed fastPFP() and fastPFP_faster() + minor stuff
minor changes