Argument Groups

Added argument groups, and minor code cleaning