Dynamics of Totally Constrained Systems. I Classical Theory