Changed some arrays to vectors. File name become an argument.