refactored file structure and few rules