added config flush command
code cleanup