Initial commit. Starting from emianalysis code.