Change error codes and add "config" route
Add API grades route