Completion: split the code into sections (not finished)