Refactor inner AsyncTask classes out to their own classes. Fixes #6.