Fixed everything from project 2 and 3. More detail in pull request