Ajax controllers and behaviors refactoring