I have problems with obtaining a Hamiltonian from a Lagrangian with constraints. My overall goal is to find a Hamiltonian description of three particles independent of any Newtonian Background and with symmetric constraints for positions and momenta. For this I start with the 3-particle Lagrangian
$$L= \frac{1}{2} \sum _{i=1}^3 \dot{x}_i^2 - \frac{1}{2\cdot 3} (\sum _{i=1}^3 \dot{x}_i)^2 - V(\{x_i - x_j\})$$
which only depends on relative variables, who are however still defined with respect to an absolute reference frame. To get rid of these (unphysical) dependencies I define new variables:
$$x_1 - x_2 = q_3\\ x_2 - x_3 = q_1 \\ x_3 - x_1 = q_2\\ x_1 + x_2 + x_3 = q_{cm}.$$
The reverse transformation is not uniquely definded. We can choose
$$x_1 = \frac{1}{3} \left( q_{cm} + q_3 - q_2 \right) \\ x_2 = \frac{1}{3} \left( q_{cm} + q_1 - q_3 \right) \\ x_3 = \frac{1}{3} \left( q_{cm} + q_2 - q_1 \right)$$
along with the constraint
$$ q_1 + q_2 + q_3 = Q = 0.$$
From this I can derive
$$ \dot{q}_1 + \dot{q}_2 + \dot{q}_3 = \dot{Q} = 0.$$
I now want to rewrite the Lagrangian in the new Variables. After a little work with the sums I arrive at
$$ \tilde L(q_i, \dot{q}_i) = \dot q_1^2 + \dot q_2^2 + \dot q_3^2 - V(q_1,q_2,q_3) $$
But now i don't know: Is the new Lagrangian of the form
$$L_{tot} = \tilde L + \alpha Q$$
or
$$L_{tot} = \tilde L + \alpha Q + \beta \dot{Q}~?$$
In a next step, and this is the core of my question, I would like to obtain the Hamiltonian and the conjugate momenta from this Lagrangian, but I have no idea how to treat the constraints. Is it possible to arrive at an Hamiltonian, where the constraint $Q=0$ holds along with a constraint for the conjugate momenta? For every help I'd be extremely grateful!
Another way of doing this could be legendretransforming the original Lagrangian and then finding a canonical transformation which has the same result. But how this could be achieved is even more mystical to me.
Regarding my Background: I am writing my Master's thesis in physics about Quantum Reference Frames. I have some knowledge about singular Lagrangians and constrained Hamiltonian systems (Like treated in the first chapters of Henneaux and Teitelboim's "Quantization of gauge systems). And I do know about the very basics of differential geometry, but I am not really profound in this topic.