Group stages by method. Fixes #80.