Refactors and add tests for Sections class. [Finishes #82883464]