Some changes to the backend ajax, Still some temp code there but its geting better