Added fix for sections not including all blocks

This also includes fixes for parsing and includes a more robust API to detect variables and configurations.