code clean up to do the application using wifi