refactoring.
Implementation of modes for different states we are in.
Check network is online when requesting address.
Fixed problem getting address for non-ASCII chars.