Moved more code into functions + now handles all vol file types