Structured the code.