second pass: simplify, use @activity tags, cleanup