Fix missing word in license
Use built-in functions to find min and max
Improve lisibility for arrays
Fix missing line returns and improper indentation