directory structure change and code refactor