Reorganized file structure and added some comments