If you have a coordinate, q, and a generalized speed, u, where u = q', then the kinematical differential equations is u - q' = 0. But here you define them as q' - q = 0, which is incorrect. You need to define some explicit generalized speeds.