Minor changes

fixed recursive refreshing error
changed return format to JSON
fixed drop down menu display problem