Implement Div, Modulo and nested scopes