move scopes to standalone classes