Add avatar code to model