Refactor one method and remove the zero from the ajax request, close #2