Changed bvals reader and added small IO functions