Added function to extract EPSPs from a directory and modified the algorithm for PSP fitting.