setting up the system ajax with some templates and the display's function