Fixed error detection ajax
Better routing