Modulo now only returns positive values
Add proper closure passing when at top-level