Added some global statistical functions
Fix forgotten semicolon
Added function to calculate residuals
Removed structure to analyze by anything but year