Group source declarations by mark comments

Fixes #61. @segiddins anything you'd do differently?
maybe a `group_by` here would make this more concise?