Removed allowAsRecordedMotions parameter.
Added a test for database loading.
Convert gmSelector to have functions declared on the object rather than in local variables.
Test for selectBestFittingGroundMotion.
Implemented the ks_diff function and use it correctly calculate global residuals.