Copied out files from BEM++