Added support for custom config vars and vars inside vars aswell as some minor changes, typo and bug fixes.