get all the ajax stuffs
updated layout and clean the code