Theory and Dynamics of Machines