Code cleanup and removing of avatar fixed