Fixed constant checks and require routes directly