CFG: Create a new subfolder cfg inside service to handle cfg

Moved most of the shared CFG code there, implemented a few CFG:I functions