Updated basic structure of the code.