update wifi module,cleanups,and minor fix for build.