Removed some unused functions and added wifi support