Changed ENABLE_DEFAULTLANG to ENABLE_UPDATELANG.
Change cap to len on line 118.
Removed excess logging.