Per @basvandijk, I've moved all of the logic into a camelTo function.