Improved code quality

Renamed DataException to RequestFailedException.
hasAchievements using incorrect hashmap

It was checking stats instead of achievements. Corrected and added unit
tests to cover this possibility.