reorganized code after merging changes from official repo, (re)done exercises chapter 2