Functional version of part 3
Merge branch 'master' into Yoshi