Changing various aspects of the code to prevent the client from manipulating the balance directly.