Refactoring core.clj for readability