Debug ajax and set to refresh when options have changed