added softAP mode and made some other tweaks