Ajax spinner, refactoring.