Removed some pylint warnings.
Fixed API call to change avatar.