Added argument handling as well as summary flag and add flag