S2 Cookbook: Logic and Flow Control