Added the passing around of values between activity and dialog