Changed main variable names to self and priv. Added missing 'new' keyword detection.