Normalize the data

Done by refactoring out operator() to wrapper function.