Namespaced the keys as it is good practice to do so.
Using tail recursion instead of crazy while loops