restructing files and adding in controllers and index