Separate entities and sql like functions.
Pushing responsibilities down.
Refactor: Try out ->>. I'm not sure this improves readability.