v1.4 init check in -- refactoring

Refactored code to move into different files.  Settings and avatar not
working as of this check in, but the other functionality is there.