refactor code. Add file / folder enum types