added buffer class; updated EPACalc; changed main.cpp accordingly