Fixing some bugs and broken scripts. Updated the mobile_detect lib.