First stab at scope analysis