Changed floats to doubles and improved data file loading