Changed the way of inertia and moving. New tests added.