Dev random

Several bug fixes. 
Added new macro to produce cutflow tables.