api wrapper and common wifi fixes