Refactoring in MainActivity class was made, avatar loading function
implemented