Replace `main` with `loop`
Merge pull request #1 from eladb/patch-1

Replace `main` with `loop`