Fixed error codes, Added controller for avatars