Adding the Ajax functionality to the server.
Adding the Correct relations to the models