Moved decoding to separate async task, allows for a loading spinner to
be set before and after decoding.