add some comments and reformat code
rename activites to dialog
update apk