Moved several chunks of code into individual functions to simplify the overall code.
Added more comments.
Reduced extra new lines.
Corrected tests to work on local AND build environments
Forced the locale data to be output in alpha order to make sure tests correctly pass.
langs.zz is now set to langs.ke on the client-side to reduce the data transfer size.