Moved some calculations in the async task. Changed the saving activity changes.