Removed redundant top level config node
Minor code restructuring