Change the structure to work by ajax and not to use the ID in connecting process, therefore removing one call