Added debug mode, and organized config more