refactoring config to var directory