Added '-g' option for setting groupSize. Updated documentation. Code cleanup.