cleaned up page refresh in ajax