changed names of files and organized code