layout.cpp: removed some TODOs and added some more comments.