The analysis is much smoother using arrays instead of dictionaries. This version will be used in the first presentation of analysis. A lot of parts are commented out and will be cleaned later.