Move section to a separate python module

We anticipate that the number of sections will grow, so this is a
good time to put it in a separate module
Add section factory and use it in core.py