Added main code structure.