Fill in the blanks
Simplify and document (a bit)