Ajax and Factory Controller