Restructure code and partial completion example 16