Fixed comments/credits
Clearer comments - function separation
Minor refactoring
Fixed comments to match filenames