Added tests for reference value calculation.
Fixed reference value calculation.
Fixed file server connection test.